smol-rs / concurrent-queue

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

Avoid the breaking change introduced in #22 #28

Closed notgull closed 1 year ago

notgull commented 1 year ago

22 introduced a breaking change because, under no-default-features, ConcurrentQueue<T> no longer implemented UnwindSafe because it was exclusive to libstd prior to 1.56. This PR adds autocfg to detect whether or not we are running in Rust 1.56. If we are, it uses UnwindSafe from libcore. Otherwise, disabling the std feature has no effect.

My only concern is that this PR may introduce a footgun for users of old compilers.

taiki-e commented 1 year ago

Hmm, considering that concurrent-queue is not used as a public dependency of other smol-rs crates, I think a new breaking release itself is fine...

notgull commented 1 year ago

If the breaking change isn't an issue, then there's no real reason to merge this.