Skip to content

Add "geolocation task queue" #87

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

Merged
merged 10 commits into from
Jul 8, 2021
Merged

Add "geolocation task queue" #87

merged 10 commits into from
Jul 8, 2021

Conversation

Image for: Conversation
Copy link
Member

marcoscaceres commented Jun 9, 2021

Closes #80

@annevk, I did as you suggested:

  1. Collapsed the "Acquire a watch id" labelled steps.
  2. "Run these steps [=in parallel=]:".
  3. Tied all callback invocations to a microtask.
  4. And now I return |watchId| as the final step.

As I had to re-indent the algorithm, probably best viewed in PR-Preview.


Preview | Diff

Copy link
Member

reillyeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some nits.

marcoscaceres and others added 2 commits June 10, 2021 14:49
Co-authored-by: Reilly Grant <reillyeon@users.noreply.github.com>
Copy link
Member

annevk commented Jun 10, 2021

Pretty sure that a microtask can only be queued in the context of a task. When you're in parallel you have to queue a task.

Copy link
Member Author

marcoscaceres commented Jun 10, 2021

@annevk, ok, I was a bit unsure. I'll queue a task, but was unsure what task source to go with... should I mint a new one for geolocation? Or do you have a suggestion for an existing one?

Copy link
Member Author

Gave this some thought... as every browser has its own dedicated location service manager, I'm going to mint a "geolocation task source".

marcoscaceres changed the title Editorial: always invoke in a micro task step Jun 10, 2021
Copy link
Member Author

@annevk, added the new "geolocation task source" 🥫.

Copy link
Member

annevk commented Jun 14, 2021

Seems reasonable. You want to use "queue a global task" and probably pass "this's relevant global object" (that you put in a variable before going in parallel).

marcoscaceres merged commit 41d7945 into gh-pages Jul 8, 2021
marcoscaceres deleted the invoke_in_task branch July 8, 2021 04:21
marcoscaceres mentioned this pull request Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants