Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should update sensor reading task be in sync with latest reading? #220

Closed
alexshalamov opened this issue May 27, 2017 · 6 comments
Closed
Milestone

Comments

@alexshalamov
Copy link

When sensor reading is changed, new ‘update sensor reading’ task is scheduled. When queued task is executed, last reading might change from the time when task was created.

Should 'update sensor reading task' use reading at the time of task creation or 'latest reading' when task is executed? (in Chromium we do latter, might reduce latency due to queue processing delay)

Would be good to reflect that in spec.

@tobie
Copy link
Member

tobie commented May 27, 2017

Should 'update sensor reading task' use reading at the time of task creation or 'latest reading' when task is executed? (in Chromium we do latter, might reduce latency due to queue processing delay)

The former. The whole point of this exercise is to avoid the latter case which might create concurrency issues.

What's the extra latency like from the queued stuff? Totally application-level code dependent?

@alexshalamov
Copy link
Author

What's the extra latency like from the queued stuff? Totally application-level code dependent?

If browsing context has multiple queues from different sources, there might be priorities for processing those queues, right?

@tobie
Copy link
Member

tobie commented May 27, 2017

If browsing context has multiple queues from different sources, there might be priorities for processing those queues, right?

Yeah, that's a good point. I have absolutely no idea how this is organized, either in spec-land or in implementations.

Filed #221 so we can look at it at a later point. From an architectural perspective of the spec, leaving this out now makes it easier to make progress.

@alexshalamov
Copy link
Author

@tobie According to resolved #8 and the specification, Sensor.|reading| always points to platform sensor 'latest reading'.

@pozdnyakov added more comments to #152

@tobie
Copy link
Member

tobie commented May 29, 2017

According to resolved #8 and the specification, Sensor.|reading| always points to platform sensor 'latest reading'.

How is that relevant to this issue?

@tobie tobie modified the milestone: Level 1 May 30, 2017
@tobie
Copy link
Member

tobie commented May 30, 2017

OK, as comments about #8 seem irrelevant to this issue, and issue itself is essentially a question about how tasks works. I'm closing this. Feel free to re-open if I missed something.

@tobie tobie closed this as completed May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants