Move Spawn/AtomicWaker/ArcWake/FutureObj to futures-task#1925
Move Spawn/AtomicWaker/ArcWake/FutureObj to futures-task#1925taiki-e wants to merge 8 commits intorust-lang:masterfrom
Conversation
4978fb6 to
82c92b2
Compare
|
This is great! What would you think about moving cc @seanmonstar -- do you have thoughts here? Being able to share |
|
My personal feeling is that making |
Makes sense! I'm skeptical that it's introducing significant compile-time cost, and it seems likely that other things in an async project would potentially make use of it (e.g. anything using |
I don't have a strong opinion. Also, by adding a new unstable feature like 'internal', you can compile it only when you need it. However, since stable crates should use futures-task, I don't think the benefits from this are big. |
|
Primarily I want to leave room for dropping the |
|
Fwiw, long term, I plan to move away from using AtomicWaker in the Tokio channel types. I’ve found that there are more efficient, specialized strategies. I mention this in case you want to avoid including AtomicWaker until you evaluate whether or not the futures types will use it long term. |
|
@carllerche Right, I think the right place to expose it is |
In this PR's approach, once we find an alternative to AtomicWaker, futures-channel can remove the dependency on futures-task. Also, note that when defining AtomicWaker in futures-core, even if futures-channel no longer requires AtomicWaker, AtomicWaker cannot be removed from futures-core because need to maintain compatibility with older versions of futures-channel. |
|
Regarding I would rather not recommend to expose |
I don't believe it can, though, since it enables feature flags in I also think that |
aebf192 to
5325417
Compare
|
@cramertj To keep a record, I'm still concerned about what I said in #1925 (comment):
Given the current maintenance state of futures-channel, I don't think there will be any immediate changes, but I think this should be considered in the next minor (or major) version. (The way I said in #1925 (comment), or something else) |
This reverts commit dd664a3.
|
Github seems to be having issues, so I've landed this manually. |
|
Thanks so much for the PR <3 |
|
By the way, this crate name (futures-task) is reserved by me, so I will hand off to @cramertj. |
This is the idea I mentioned in #1893 (comment), and address some suggestions of #1893 (comment):
#1893 (comment)
#1893 (comment)
Closes #1830
r? @cramertj
cc @seanmonstar @Nemo157