views:

30

answers:

1

Lets say i have a Poco::Thread: Thread Parent has an eventhandler method within it.
The parent then spawns two children threads, who are given events that are the parent subscribes the eventhandler to.
So two events both have the same event handler attached.
If Child A triggers their event, and Parent starts to execute it, what would happen if Child B triggered their event before Parent was finished?
Are these requests queued up automatically, or do i have to lock everything out myself?

+1  A: 

Event delegates are called within the thread of the caller (unless you're using notifyAsync()), so in the case of multiple threads triggering the same event you'll have to take care of synchronization in your event handlers yourself.

obiltschnig