-
Notifications
You must be signed in to change notification settings - Fork 653
Introduce LocalTaskObj #1046
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
Introduce LocalTaskObj #1046
Conversation
7e49abd
to
3c900d4
Compare
@MajorBreakfast Pinged you on discord about this. I think, rather than a separate trait, I'd prefer to remove the |
I agree. It would then be very similar to how we do it with the |
Do we want to add |
@MajorBreakfast Hm, good question! I think either way is fine-- these are all going to be deprecated once unsized-rvalues + arbitrary-self-type-object-safety are fixed, so I don't think it matters particularly much either way. |
We will still need need the distinction for between If you let me pick, then I'd put them into core because this way we can use |
@MajorBreakfast In the long term, I figured we wouldn't have |
Here is the PR that puts
|
@MajorBreakfast It will have to go away once spawning goes through unsized rvalues, since there's no way to hand them back. |
That's a bummer. So, this won't work? I thought the last element of a struct can be unsized? pub struct SpawnError {
pub kind: SpawnErrorKind,
pub future: dyn Future<Output = ()> + Send,
} Edit: I just looked at the RFC again. Functions will have to return a sized type. Then it's clear that it can't work |
The new nightly which now includes |
3c900d4
to
114078f
Compare
I've updated the PR to use |
Nice! This is great! |
LocalTaskObj
and integrate it intoLocalPool
core::task
underfutures::task
(some was previously exported underfutures::executor
) This is probably just a start. There're probably still some inconsistencies in the exports.futures-executor/tests/local_pool.rs
work