Konrad `ktoso` Malawski
2467f6aaea
[Concurrency] Task.withGroup can be rethrows
2021-03-08 13:39:12 +09:00
Konrad `ktoso` Malawski
aedbbe615d
[TaskGroup] Towards ABI stability of groups
2021-03-02 20:25:22 +09:00
Konrad `ktoso` Malawski
1cb3000a7e
[TaskGroup] group is not NativeObject, just an opqeue value
2021-02-26 16:03:30 +09:00
Konrad `ktoso` Malawski
de5fdcd2f8
[TaskGroup] fix missing retain in scheduling next() immediately on offer
2021-02-24 18:45:33 +09:00
Konrad `ktoso` Malawski
655d8f13e7
cleanup after rebase; this is likely incorrect in some way
2021-02-24 12:10:49 +09:00
Konrad `ktoso` Malawski
6f4fca8721
Merge branch 'main' into wip-no-escape-group
2021-02-24 08:59:53 +09:00
John McCall
2012195cd5
Alter the runtime interface for awaiting futures and task groups.
...
First, just call an async -> T function instead of forcing the caller
to piece together which case we're in and perform its own copy. This
ensures that the task is actually kept alive properly.
Second, now that we no longer implicitly depend on the waiting tasks
being run synchronously, go ahead and schedule them to run on the
global executor.
This solves some problems which were blocking the work on TLS-ifying
the task/executor state.
2021-02-21 23:48:13 -05:00
Konrad `ktoso` Malawski
999758cc85
[Concurrency][TaskGroup] allow cancelAll be invoked from child tasks
2021-02-22 13:26:33 +09:00
Konrad `ktoso` Malawski
35f75ba2f2
[Concurrency] Add notes about removing children on next()
2021-02-22 13:26:33 +09:00
Konrad `ktoso` Malawski
1c4655df6a
[Concurrency] track child tasks from group in Task records
2021-02-22 13:26:33 +09:00
Konrad `ktoso` Malawski
efc7d8e627
[Concurrency] rearrange layout of AsyncTask now that task locals and groups coexist
2021-02-22 13:26:33 +09:00
Konrad `ktoso` Malawski
12e2ba07b1
[Concurrency] Conform Task.Group to AsyncSequence
2021-02-22 13:26:33 +09:00
Konrad `ktoso` Malawski
b1e5c4a2c4
test cleanups, additional test to check we dont cancel other groups
2021-02-22 13:26:28 +09:00
Konrad `ktoso` Malawski
1860b20cb7
[Concurrency] cancel all child tasks of a group on cancelAll
2021-02-22 13:26:27 +09:00
Konrad `ktoso` Malawski
1970dbfdae
fix over releasing the current task by group dealloc
2021-02-22 13:26:27 +09:00
Konrad `ktoso` Malawski
a100424b4a
getting there with assuming that poll is a single task
2021-02-22 13:26:27 +09:00
Konrad `ktoso` Malawski
a226259d84
[Concurrency] TaskGroup moves out of AsyncTask, non escaping body
2021-02-22 13:26:27 +09:00
Konrad `ktoso` Malawski
08de933288
[Concurrency] Task revisions 3
...
- introduce UnsafeCurrentTask
- implement Hashable, Equatable on tasks
- assume we'll have a way to get a task from sync context
- Task.Handle now has a Failure type as well
- Task.Handle.getResult
2021-02-12 09:06:17 +09:00
Doug Gregor
9efb44fde8
Adopt @concurrent in Task APIs
2021-01-28 10:03:09 -08:00
Konrad `ktoso` Malawski
80ee936a72
Revert "[Concurrency] isCanceled spelling to follow guidance"
2021-01-23 07:27:34 +09:00
Konrad `ktoso` Malawski
8b37455774
[Concurrency] isCanceled spelling to follow guidance
2021-01-22 12:09:19 +09:00
Doug Gregor
3c38ffe0ea
[Concurrency] await try -> try await
...
The `try await` ordering is both easier to read and indicates the order
of operations better, because the suspension point occurs first and
then one can observe a thrown error.
2020-12-23 13:21:59 -08:00
Konrad `ktoso` Malawski
b267778bf1
Rebased to use new global executor
2020-12-17 06:05:13 +09:00
Konrad `ktoso` Malawski
9e1ecc539c
[Concurrency] guard offer/poll with a lock for now; cleanups
2020-12-17 06:05:13 +09:00
Konrad `ktoso` Malawski
7b37554096
[Concurrency] Initial TaskGroup implementation working
2020-12-17 06:05:13 +09:00
Konrad `ktoso` Malawski
e294c7cbad
[Concurrency] Implement TaskGroup.isEmpty via readyQueue
...
before reversing order of fragments; future must be last since dynamic
size
offer fixed
before implementing poll
2020-12-17 06:05:13 +09:00
Konrad `ktoso` Malawski
520b513e8a
[Concurrency] Task: isCancelled,checkCancelled implementation
...
move comments to the wired up continuations
remove duplicated continuations; leep the wired up ones
before moving to C++ for queue impl
trying to next wait via channel_poll
submitting works; need to impl next()
2020-12-17 06:05:13 +09:00
Konrad `ktoso` Malawski
9162d40cff
+task Implement Task.currentPriority
...
cleanups
2020-12-17 06:05:13 +09:00
Doug Gregor
35acd40b1e
+concurrency task groups initial work in progress
2020-12-17 06:05:13 +09:00
Konrad `ktoso` Malawski
49c6ae3da5
[Concurrency] Nurseries are now Task.Groups
2020-11-06 10:58:51 +09:00