[fpc-devel] Threads and alot of crap continued
Michael Van Canneyt
michael.vancanneyt at wisa.be
Thu Nov 9 13:27:30 CET 2006
On Thu, 9 Nov 2006, Michael Schnell wrote:
> > Alas, Object Pascal lacks a decent portable OS tasking interface.
> With Delphi we successfully used Windows Messages for inter Thread
> With FPC on Linux a friend of mine used System 5 Messages queues for the same
> So IMHO inter Thread messages is a good way to go.
> As neither Delphi nor FPC have a portable way to use inter Thread messages, in
> both simply the system API encapsulations provided were used.
> This is why I vote for doing a portable implementation of inter Thread
> messaging, including firing an event (at first only in the main thread) when a
> message arrives. Of course a Delphi/Lazarus compatible GUI-less TTimer
> implementation can easily be made on top of this.
> In Delphi there is a way to register Windows message callbacks for the GUI
> thread in a very Windowish way. I don't know if the Lazarus people implemented
> something like this and if it's portable.
No. The message loop is very low level.
Why don't you simply go ahead, implement something (cross-platform) and then
we can see how this can be integrated in FPC, if this integration is needed at all...
We can discuss for days in the air....
Better show some working code, then we can discuss about specifics.
More information about the fpc-devel