> But I can't see how the implementation of triggerEvent() can be thread safe, > e.g, the last line: > > fTriggersAwaitingHandling |= eventTriggerId; > > must load, modify and store the value at fTriggersAwaitingHandling
It depends on the CPU architecture. In many (if not most?) architectures, it’ll just be a single instruction. I’d put a mutex around that instruction, if there were a good portable way of doing so (i.e., portable across Unix and Windows, and across both old and new compiler versions). Feel free to put a mutex around your call to “triggerEvent()” - to see if that solves your problem. (In fact, you should have done that first, before speculating on this mailing list :-) Ross Finlayson Live Networks, Inc. http://www.live555.com/
_______________________________________________ live-devel mailing list [email protected] http://lists.live555.com/mailman/listinfo/live-devel
