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

[RFC] Scheduler.await #87

Closed
joshgoebel opened this issue Apr 28, 2021 · 0 comments · Fixed by #84
Closed

[RFC] Scheduler.await #87

joshgoebel opened this issue Apr 28, 2021 · 0 comments · Fixed by #84

Comments

@joshgoebel
Copy link
Contributor

joshgoebel commented Apr 28, 2021

I already spotted the call extern/Scheduler.runNextScheduled_() pattern:

  static mkdir(path) {
     ensurePath_(path)
     mkdir_(path, Fiber.current)
     return Scheduler.runNextScheduled_()
     return await { mkdir_(path, Fiber.current) }
   }

And was replacing it with:

  static mkdir(path) {
     ensurePath_(path)
     return await_ { mkdir_(path, Fiber.current) }
   }

But much like #65 it why don't we just move this responsibility into Scheduler:

  static mkdir(path) {
     ensurePath_(path)
     return Scheduler.await_ { mkdir_(path, Fiber.current) }
   }

await is no doubt familiar to those doing async in JavaScript, but open to a better name...

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 a pull request may close this issue.

1 participant