Hi,

the current Live555 uses `volatile` for interthread synchronization in doEventLoop.

As per C++ specification, volatile cannot be used for this purpose and in fact introduces undefined behavior. (*) Although we can argue about what practical effect this has I believe that just following the specification is the safer route, particularly on SMP.

I believe that Ross is aware that you can't use volatile to synchronize between different threads (**),
but as of today the wrong use of volatile is still in the code base.

Although changing the signature of doEventLoop might break existing applications, is this something
to consider?

 - Godmar


(*) https://en.cppreference.com/w/cpp/language/cv
(**) http://lists.live555.com/pipermail/live-devel/2023-June/022315.html
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to