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

ability to "bundle" more errors before the first suspend point in an async function #1197

Closed
andrewrk opened this issue Jul 5, 2018 · 2 comments
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Jul 5, 2018

I'll expand on this later but I need an issue to link to.

  • When you await in the same stack frame that you async, there does not need to be a coroutine allocation.
  • When you async before the first suspend point in a coroutine frame, this can be made to not fail, because the allocation could have been bundled up with the callee's coroutine frame
@andrewrk andrewrk added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Jul 5, 2018
@andrewrk andrewrk added this to the 0.3.0 milestone Jul 5, 2018
@andrewrk andrewrk mentioned this issue Jul 5, 2018
3 tasks
andrewrk added a commit that referenced this issue Jul 7, 2018
 * add std.atomic.QueueMpsc.isEmpty
 * make std.debug.global_allocator thread-safe
 * std.event.Loop: now you have to choose between
   - initSingleThreaded
   - initMultiThreaded
 * std.event.Loop multiplexes coroutines onto kernel threads
 * Remove std.event.Loop.stop. Instead the event loop run() function
   returns once there are no pending coroutines.
 * fix crash in ir.cpp for calling methods under some conditions
 * small progress self-hosted compiler, analyzing top level declarations
 * Introduce std.event.Lock for synchronizing coroutines
 * introduce std.event.Locked(T) for data that only 1 coroutine should
   modify at once.
 * make the self hosted compiler use multi threaded event loop
 * make std.heap.DirectAllocator thread-safe

See #174

TODO:
 * call sched_getaffinity instead of hard coding thread pool size 4
 * support for Windows and MacOS
 * #1194
 * #1197
@andrewrk
Copy link
Member Author

I created #1260 for the first bullet point. I'll let this issue become the second bullet point.

@andrewrk andrewrk changed the title guaranteed memory elision for coroutines under some circumstances ability to "bundle" more errors before the first suspend point in an async function Jul 18, 2018
@andrewrk andrewrk modified the milestones: 0.3.0, 0.4.0 Aug 25, 2018
@andrewrk andrewrk modified the milestones: 0.4.0, 0.5.0 Feb 10, 2019
@andrewrk
Copy link
Member Author

andrewrk commented Aug 16, 2019

Obsoleted with the merge of #3033. async can no longer fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

No branches or pull requests

1 participant