2014-09-15 20:34 GMT+08:00 Sven Barth <pascaldra...@googlemail.com>:

> If you want to use a separate thread ("dispatcher") for enqueueing new
> work you should create an event that you pass to this thread and the worker
> threads. The dispatcher waits on the event and the worker threads will
> signal the event once they are done. Of course you'll likely also signal
> the event when new work items are queued that need to be dispatched.
>
In Michael's previous email, I understand that using PostMessage and
QueueAsyncCall will does the same thing.

How do I use Event to achieve the same? It seems that I can have N threads
"listen" to the same event, but cannot have the main thread to "listen" to
N different events?

Anyway, if I use Event I'll do some more reading of the document. For now,
I would like to know, performance-wise, which way is better? Using
QueueAsyncCall/PostMessage or RTLEvent*?
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to