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
add task::LocalSet
API for running !Send
futures
#1733
Commits on Nov 6, 2019
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
change API to work with multiple block ons
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
use marker types to indicate whether a task is Send
This adds a marker type to the `Task` struct and `Schedule` trait indicating whether or not the task is `Send`, and changes `Task` to only implement `Send` when the `Send` marker is present. Schedulers must indicate whether they are capable of scheduling `Send` or `!Send` tasks. This solution is singnificantly better than the previous one of using an unsafe wrapper to make `!Send` tasks implement `Send`, which was necessary due to the bounds on the `Task` struct. Although the previous solution was correct, since the `!Send` tasks were only ever scheduled locally, the compiler could no longer verify that this was the case. Now, the typesystem actually _helps_ us ensure that schedulers that can only schedule `Send` tasks will never schedule `!Send` tasks. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
re-export local mod from root, feature flag
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
These assertions asserted that the scheduler was current in all calls to its methods. However, the `TaskSet::spawn_local` method allows scheduling tasks to be run on the `TaskSet` when it is _not_ currently running. Therefore, these assertions are wrong. This test moves the assertion to the _right_ place: when the scheduler actually _runs_ scheduled tasks. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
fix missing pin-project without default features
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
fix unused code when
local
is disabledSigned-off-by: Eliza Weisman <eliza@buoyant.io>
-
add send markers to debug output
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
fix more feature-flaggy sadness
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
These assertions asserted that the scheduler was current in all calls to its methods. However, the `TaskSet::spawn_local` method allows scheduling tasks to be run on the `TaskSet` when it is _not_ currently running. Therefore, these assertions are wrong. This commit moves the assertion to the _right_ place: when the scheduler actually _runs_ scheduled tasks. I had previously made this change but I think that it was lost in a rebase. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
-
-
-
don't run local tests when running loom tests
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Commits on Nov 13, 2019
-
Merge branch 'master' into eliza/local-spawn
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
move local out of runtime and into task
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Thanks to @carllerche for the suggestion; this makes the diff much smaller! Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
fix tests using the wrong blocking
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
naming + internal docs improvement
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
fix local future spinning instead of parking
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
local scheduler doesn't need to be Send + Sync
it *shouldn't* be, because it's just a pile of UnsafeCells... Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
add tests for waking a local set from IO
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
use the rt's waker in block_on
this fixes the local set not being woken by IO on the current-thread rt Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
fix local queue being pushed to from remote
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
use AtomicWaker instead of mutex
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
maybe they were supposed to be underscores???
i just copied the clippy error message... Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Commits on Nov 14, 2019
-
put clippy attribute in the right place
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
fix unused code based on feature flags
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
review feedback: rename
ScheduleSend
->ScheduleSendOnly
thanks @jonhoo! Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Commits on Nov 18, 2019
-
Merge master + update some things
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Avoid starving the remote queue
Copied from `basic_scheduler` Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
allow tasks to be cancelled remotely
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
-
-
Commits on Nov 21, 2019
Commits on Nov 26, 2019
-
Merge branch 'master' into eliza/local-spawn
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
rm empty file committed accidentally
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
-
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Commits on Nov 27, 2019
-
fix AtomicWaker being enabled when not used
Signed-off-by: Eliza Weisman <eliza@buoyant.io>