-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Replace crossbeam with std::sync::mpsc #7346
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
Conversation
…ource_external_thread example
Rust 1.67 is out, so this is now unblocked. |
Going to block this until we bump the MSRV to 1.67, otherwise we actually have a period where we are allowing the use of the older |
@OneFourth do you think you can drive this to completion? Seemed like you weren't when you mentioned it in the issue. If not, I can mark this up for adoption. |
@james7132 I can't, definitely out of my depth with trying to get bevy_asset to compile, feel free to mark it up for adoption! I hope the other commits are still useful at least |
# Objective Bump the MSRV to 1.67. Enable cleanup PRs like #7346 to work. ## Solution Bump it to 1.67 --- ## Changelog Changed: The MSRV of the engine is now 1.67.
I am wary that this change should be done at this Point in Time.
For these Reasons, I would not merge this PR yet, and even revert #7379, as the only practical reason to require |
Bb 666
|
# Objective Bump the MSRV to 1.67. Enable cleanup PRs like bevyengine#7346 to work. ## Solution Bump it to 1.67 --- ## Changelog Changed: The MSRV of the engine is now 1.67.
I tend to agree with @MinerSebas Does anyone know why
The claim in the Rust 1.67 change-log that boasts that
I can think of some hacks of the Really Nasty variety that could work around this but they would not only be nasty: there is no point replacing |
After trying to adopt this PR myself, I am inclined to agree. It's unfortunate that the stdlib cannot be updated to reflect this. We may need to wait for a With that said, @OneFourth, thanks for exploring this space for us. Really appreciate the effort done here, even if it didn't lead to concrete changes, we've learned quite a bit. |
Objective
Fixes #7153.
Solution
Remove
crossbeam_channel
as a dependency and replace it withstd::sync::mpsc
instead.A one-to-one conversion was not possible because
crossbeam_channel
supportsSync
while theReceiver
instd::sync::mpsc
does not, so I tried to make use ofbevy_utils::sync_cell::SyncCell
.bevy_asset
had many many issues with this though, I tried to sort through them but I couldn't figure out what to do now or I'm taking the wrong approach.Current problems
Arc<RefChangeChannel>
needing to bemut
now withSyncCell
by wrapping the innerRefChangeChannel
in aMutex
, but this results infuture cannot be sent between threads safetly
inAssetServer::load_untracked
.impl Clone
forHandle
is also a problem, since we don't have amut
borrow ofself
mut
nowChangelog
Removed
crossbeam_channel
dependency.Replaced
crossbeam_channel
usage withstd::sync::mpsc
.Migration Guide
Unsure