Comments (5)
Right. The first mioco thread should be the current one.
from mioco.pre-0.9.
Is this really a big issue for you? I looked at the code, and the biggest reason to do this the way it is currently is simplicity.
from mioco.pre-0.9.
It isn't a big issue. My primary concern was related to the less than ideal interaction between threads and signal handlers, but that can be worked around.
Thanks for looking into it.
from mioco.pre-0.9.
Its actually an issue for me. Many ffi-libraries rely on having access to the main thread. With mioco this is impossible, as the main-thread will be always joining all worker threads, instead of becoming a worker thread itself.
I think it would be quite easily to implement by moving the thread creation out of spawn_thread into start (and probably renaming spawn_thread in the process to something like thread_loop). Then start could call that function itself at the end.
Would you interested in a pull request for this?
from mioco.pre-0.9.
Sure.
from mioco.pre-0.9.
Related Issues (20)
- Optimising repeated select!s HOT 1
- Is `mioco::get_userdata` sound? HOT 17
- Error handling for TcpStream::connect to non-listening port HOT 3
- `Receiver` should not be always `Send` HOT 5
- Channel panics when mixing `recv()` and `select!` HOT 5
- `UnixListener` is not usable. HOT 2
- Implement `sync_channel`
- `select!` takes at least one tick, which is super slow.
- No way to cancel notifications - select! on a lot of channels in loop can accumulate tons of notifications. HOT 1
- Change the documentation to remove the need for Rust Nightly HOT 2
- Missing openwrt/mipsel support HOT 3
- Prevent using mioco types from multiple thread(coroutines) at the same time. HOT 3
- clear documentation on handling panics HOT 17
- Travis panic
- Test fail in 0.8.0 with rustc stable and beta HOT 1
- Mioco is blocked polling for IO while there are runnable tasks HOT 1
- Mioco compilation with channels and streams fails. HOT 6
- reader.try_read() blocks forever after reading a few bytes
- Colerr mioco-related crash on short program.
- program crashed when run long time HOT 1
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 mioco.pre-0.9.