On 02/18/2010 10:16 PM, Nikolai Zhubr wrote: > ... if you are going to make this messaging work to some degree in > non-main thread on windows, you'll probably need to take care of some > things manually.
Of course you are right that the Delphi / Windows paradigm only allows for a single message queue and same is dedicated to the main thread as a receiver. Lazarus / Windows uses the same algorithm as Delphi. Lazarus / Linux reproduces the same behavior with a different algorithm. For now, the NoGUIApplication Lazarus package I am planning, is suppose to reproduce this behavior, too, with a home-brew message queue. For the future I think about having the home-brew message queue done in a way that allows for multiple instances of same and thus allow for worker threads to be programmed using an event-driven paradigm. > When I ported some threaded delphi application to linux I replaced > window handles (used for inter-thread communication) by unix pipes. While this of course is possible, I suppose a pure user-land algorithm should offer better performance. > These are not exactly the same, but generally provide sufficient > functionality and are quite easy to use. No idea if it is anywhere > appropriate in your case, though. The event queue (ported form mse) already does work nicely for me (e.g. with for timer events, TThread.Synchronize). I just wonder if supporting procedure ... messages in the package is possible / viable / necessary. -Michael _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
