Link to home
Start Free TrialLog in
Avatar of thready
thready

asked on

critical sections c++

Hi Experts,

I have a list of subscribers that I'm broadcasting an event to.  This list changes size at any time, so of course, before enumerating each listener and broadcasting to each, I need to be in a critical section block.  Is there any other way of doing this?  How expensive is it to be in this block (is there a good way to measure how expensive it is?)  I have a lot of events coming from a real-time device and I want to make sure they happen as fast as possible- while allowing for multiple subscribers for the events......

Thank you!
Mike
ASKER CERTIFIED SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thready
thready

ASKER

This is a great answer!  Thanks!  :)