Comments (4)
The bounds were deliberately left off to provide a maximally flexible, unsafe spawning function -- i.e., to cover even the case where you wanted to work with a non-Send
closure unsafely.
That said, the flexibility isn't needed for scoped threads, and of course does add to the overall danger of this function. Arguably, this treatment of Send
might be better accomplished through a newtype wrapper anyway. So I'm open to adding the bound.
from crossbeam.
An alternative might be to provide two unsafe functions instead of one, where one requires Send
, and its use is recommended where possible.
from crossbeam.
Given that there's not a pressing need for a version without Send
, I'd accept a PR that just added Send
to the current method.
from crossbeam.
PR submitted: #55.
from crossbeam.
Related Issues (20)
- Can we avoid to call `try_advance` in some senarios? [crossbeam-epoch] HOT 2
- Epoch memory reclamation algorithm HOT 2
- consider adding `is_disconnected` method to Receiver type HOT 1
- Scaling receiver counter up/down based on demand
- `select!` macro and auto-complete HOT 1
- [crossbeam-epoch] false sharing issue for "epoch: AtomicEpoch" field in "Local" struct
- crossbeam-skiplist bug HOT 3
- epoch `fetch_update` not working as expected HOT 2
- Is there any difference between SeqCst store and SeqCst fence after a Relaxed store? HOT 1
- Consider exposing different flavors of channels using different types. HOT 9
- Overflow evaluation with recursive types and Box HOT 1
- crossbeam-deque has no blocking pop: how do you use it?
- Semantic one-shot channel HOT 3
- Publish new `crossbeam-epoch` with updated `memoffset` HOT 2
- crossbeam_channel::tick delivery_time can support different flavor HOT 4
- what shuld used for AtomicCell or ShardedLock HOT 1
- Cirrus CI no longer supports 32-bit mode on ARM Linux runners
- Always use load(Acquire) for load_consume on Miri/TSan
- Question (epoch): How to avoid Miri to report data race on an `Atomic` pointer? HOT 6
- crossbeam::channel::Receiver::try_recv can block forever if sending thread is blocked HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crossbeam.