smol-rs / concurrent-queue

Concurrent multi-producer multi-consumer queue
Apache License 2.0
254 stars 22 forks source link

Make it so this crate can be `no_std` #22

Closed notgull closed 2 years ago

notgull commented 2 years ago

This PR adds an std feature enabled on this crate by default. This feature implements (Ref)UnwindSafe on the channel and uses std::thread::yield_now() in busy-waiting within the channels. Without this feature, core::hint::spin_loop() is used instead.

Due to the (Ref)UnwindSafe not being implemented without std, this is a breaking change.

taiki-e commented 2 years ago

Hmm, the last few commits seem unrelated.

notgull commented 2 years ago

Yes, I rebased on master