Events via Queue instead of Threads

A general discussion forum.
yaerek
Posts: 5
Joined: 30 Dec 2008, 10:35

Events via Queue instead of Threads

Postby yaerek » 13 May 2009, 15:34

Hi. I've been using BasicEvent to handle GUI events.
Things work great, until we've hooked up a volume control slider (audio volume).
When you control volume, you send a sequence of events, gradually increasing/decreasing volume.
When this happens using poco BasicEvent (synchronous, asynchronous) - tenths of threads (50-120) are getting generated and
eventually the program crashes.

Is there a way to force PoCo BasicEvent to use a single thread and to serialize all event calls? (so the same thread executes each change in volume control)?

Best Regards,
Yaerek

alex
Posts: 1297
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Events via Queue instead of Threads

Postby alex » 14 May 2009, 15:05

yaerek wrote:Is there a way to force PoCo BasicEvent to use a single thread and to serialize all event calls? (so the same thread executes each change in volume control)?


If you use the notify() method, then you are in synchronous mode - no threads are launched by the framework. Are you launching any threads from your handlers?


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests