Recent

Author Topic: Minimal IPC approach?  (Read 2248 times)

cdbc

  • Hero Member
  • *****
  • Posts: 2872
    • http://www.cdbc.dk
Re: Minimal IPC approach?
« Reply #15 on: May 02, 2025, 10:27:35 am »
Hi
Erhmmm... Thaddy, how would that go, between processes - not threads?!?
The simplest solution is a 'trigger'-file in /tmp/ with the PID of the target process...
Next in line is a memory-mapped file...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Thaddy

  • Hero Member
  • *****
  • Posts: 19472
  • Glad to be alive.
Re: Minimal IPC approach?
« Reply #16 on: May 02, 2025, 11:59:58 am »
How can you read what I am doing just now?????

Yes, I was just working with fpmmap on linux and windows createfilemapping
That can be made cross-platform too. Integers are atomic and there is no actual file IO, since on Linux the value is stored in /tmp and that directory is typically on RAM (tmpfs). On Windows it is also in memory for such small values, which are also atomic. In both cases it has incredibly low overhead.
« Last Edit: May 02, 2025, 12:18:11 pm by Thaddy »
Any "programmer" that knows only one programming language is not a programmer

cdbc

  • Hero Member
  • *****
  • Posts: 2872
    • http://www.cdbc.dk
Re: Minimal IPC approach?
« Reply #17 on: May 02, 2025, 12:25:32 pm »
Hehehe, Thaddy ...it's magic  ;D
+ it's me b-day today   ...gotten a year wiser  ::) ;)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

 

TinyPortal © 2005-2018