8000
Skip to content

Add "geolocation task queue" - #87

Merged
marcoscaceres merged 10 commits into
gh-pagesfrom
invoke_in_task
Jul 8, 2021
Merged

Add "geolocation task queue"#87
marcoscaceres merged 10 commits into
gh-pagesfrom
invoke_in_task

Conversation

@marcoscaceres
@marcoscaceres marcoscaceres commented Jun 9, 2021
Copy link
Copy Markdown
Member

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

@reillyeon reillyeon left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with some nits.

Comment thread index.html Outdated
Comment thread index.html Outdated
marcoscaceres and others added 2 commits June 10, 2021 14:49
Co-authored-by: Reilly Grant <reillyeon@users.noreply.github.com>
@annevk
annevk commented Jun 10, 2021
Copy link
Copy Markdown
Member

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.

@marcoscaceres
marcoscaceres commented Jun 10, 2021
Copy link
Copy Markdown
Member Author
8000

@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?

@marcoscaceres
Copy link
Copy Markdown
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 marcoscaceres changed the title Editorial: always invoke in a micro task step Add "geolocation task queue" Jun 10, 2021
@marcoscaceres
Copy link
Copy Markdown
Member Author

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

@annevk
annevk commented Jun 14, 2021
Copy link
Copy Markdown
Member

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).

Comment thread index.html Outdated
Comment thread index.html Outdated
@marcoscaceres
marcoscaceres merged commit 41d7945 into gh-pages Jul 8, 2021
@marcoscaceres
marcoscaceres deleted the invoke_in_task branch July 8, 2021 04:21
@marcoscaceres 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Callbacks are invoked while in parallel

3 participants

0