[vlc-devel] [PATCH] Handle GET_PARAMETER keepalive responses during PAUSE
remi at remlab.net
Wed Jun 24 22:52:27 CEST 2015
Le mercredi 24 juin 2015, 13:38:26 Ross Finlayson a écrit :
> > You are not making no sense here. Considering the current
> > BasicTaskScheduler0 class implemention of doEventLoop(), only the thread
> > calling doEventLoop() can set the watch variable.
> No, you are misunderstanding the purpose of this mechanism.
I made no claims as regards the purpose of the mechanism. However, the
behaviour of the current implementation of the mechanism is as I described,
- I do not make the rules.
- You do not make the rules.
- The compiler makes the rules.
> The ‘watch
> variable’ is checked only within the LIVE555 event loop, but it can be set
> (to a non-zero value) by an external thread, to signal - to the LIVE555
> thread - that it needs to exit its call to “doEventLoop()".
The "watch variable" is accessed for reading by the LIVE555 event loop. As a
consequence, one of the following must be true:
1) The variable is read-only. doEventLoop() is a no-op if the variable is true
on entry. doEventLoop() is an infinite loop otherwise.
2) The variable is read/write for the thread calling doEventLoop() and not
accessed by any other thread (at least while doEventLoop() executes). This is
what I meant: the variable can only be set from a callback in the event loop.
> That’s what VLC’s “live555.cpp” interface code does.
As far as I can tell, the VLC plugin only sets the "watch variable" from
within callbacks of the event loop, not from any other thread. But if it does
set it from another thread, then it is a bug.
More information about the vlc-devel