Comments (4)
Then, what's the return type of resume
? Result<Option<T>>
?
If the parent and its children are not running in the same thread, then the return result must be transferred from this thread to another thread. This is also an obstacle of implementing #48 .
from coroutine-rs.
Hmm, good catch. Then, this issue seems like a subset of #48.
from coroutine-rs.
With #68 it's possible:
let mut coro = Coroutine::spawn(move |me,_| {
42
});
let result = coro.resume(0);
We haven't return types larger than usize
. For custom types pointer
s have to be used, like I do there. If we add something like Result<T>
we'll increase overhead for coroutines which don't need results quite.
I think this issue should be closed.
from coroutine-rs.
You are right.
from coroutine-rs.
Related Issues (20)
- mioco - coroutine-rs -based mio connection handling HOT 3
- Pushing and pulling parameters. HOT 5
- Stable Support HOT 3
- Disable printing on stderr? HOT 2
- Compilation fails due to use of deprecated `page_size`
- Broken by recent rustc nightly. HOT 7
- mismatched types between `c_void` and boxed closure HOT 4
- Can't run example HOT 4
- Relicense under dual MIT/Apache-2.0 HOT 10
- Query if coroutine is ready HOT 2
- Why do the closures taken by Coroutine::spawn have to have the static lifetime? HOT 1
- Having one coroutine exit stops the entire program. HOT 4
- thread safe documentation HOT 1
- Confusing README header HOT 1
- Run without blocking like thread::spawn HOT 3
- Unable to compile program: no `FnBox` in `boxed` HOT 3
- 这个库提供的协程是像`go`一样的`有栈协程`,还是像`kotlin`一样的`有栈协程`? HOT 3
- README update with relationship to current Rust? HOT 1
- Doesn't seem to build 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 coroutine-rs.