[Live-devel] [EXTERNAL] Re: Possible concurrency issue with triggerEvent()

Ross Finlayson finlayson at live555.com
Fri Jun 16 07:03:19 PDT 2023


One more thing...

> On Jun 7, 2023, at 5:52 AM, Hansen Jan Rørgård <jan.r.hansen at dk.saabgroup.com> wrote:
> 
> triggerEvent called twice but eventHandler is called once:
> ===============================================
> Let's say NT has called createEventTrigger with EH1 and now has:
> ET1 : EventTriggerId1
> Then we can have the sequence:
> NT                                                     LT
> |                                                        |
> triggerEvent(ET1) ----------------> (TAW=0x00000001)
> triggerEvent(ET1) ----------------> (TAW=0x00000001)
>                                                           ---------------
>                                                                             | singleStep()
>                                                                             | handle ET1 by calling EH1
> 
> This might be intended behaviour

Yes, actually this is intended - and is not changed by the recent update to the code.  Calls to “triggerEvent()” with the same event trigger id are not intended to be 'queued up’.  Instead, you should wait until the event is handled before calling “triggerEvent()” (with the same event trigger id) again.

In a future release of the code, I will update the comment in the header file to make this clear.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list