- From: François Daoust via GitHub <sysbot+gh@w3.org>
- Date: Fri, 02 Sep 2016 08:24:12 +0000
- To: public-tvcontrol@w3.org
> I would argue that TVSource.setCurrentChannel() is probably the call that locks the resources I think that model would allow the following scenario: 1. App 1 - calls `TVTuner.setCurrentSource`, succeeds 2. App 2 - calls `TVTuner.setCurrentSource` with a different source, succeeds 3. App 1 - calls `TVSource.setCurrentChannel`. Either the call fails because the source is no longer the current source, or the call succeeds but App 1 cannot read `TVTuner.stream` since the source is no longer the current source. In both cases, App 1 did not do anything wrong, and if App 2 does not do anything with the tuner in the meantime, it can fix the problem by re-issuing a call to `setCurrentSource`. It seems strange to design an API that basically encourages apps to retry in case something fails. Locking the tuner when a call to `setCurrentSource` is issued would solve that problem. -- GitHub Notification of comment by tidoust Please view or discuss this issue at https://github.com/w3c/tvcontrol-api/issues/3#issuecomment-244314030 using your GitHub account
Received on Friday, 2 September 2016 08:24:20 UTC