W3C home > Mailing lists > Public > public-device-apis-log@w3.org > May 2017

Re: [sensors] Define tasks for state changes

From: Tobie Langel via GitHub <sysbot+gh@w3.org>
Date: Tue, 30 May 2017 23:29:51 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-305037889-1496186990-sysbot+gh@w3.org>
> Example 1:
> Sensor is active and update reading is queued, then error occurs and page loses visibility.
> Now we have 3 tasks in queue [update sensor reading, onerror, state change to idle].

Page looses visibility is not going to queue anything afaik.

> Should we process queue

Yes.

> and don’t allow new tasks to be added from sensor?

Not sure what you mean by that, but the sensor can continue adding new tasks (for example if it's re-started).

> Should we 'suspend' tasks and wait when page gains visibility and then process tasks?

No, they're queued and can be processed right away.

> Example 2:
> Sensor is is active, update sensor reading scheduled, then stop is called.
> Two tasks in queue [update sensor reading, change state to idle]
> Should we cancel queued update?

No.

-- 
GitHub Notification of comment by tobie
Please view or discuss this issue at https://github.com/w3c/sensors/issues/218#issuecomment-305037889 using your GitHub account
Received on Tuesday, 30 May 2017 23:29:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 12:18:53 UTC