Closed
Bug 541587
Opened 15 years ago
Closed 15 years ago
make it possible to spawn a task that returns non-nil
Categories
(Servo Graveyard :: Rust, defect)
Servo Graveyard
Rust
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: graydon, Unassigned)
Details
Currently only fn foo(a,b,c)->() can be spawned; the output slot in the spawnee is not wired up properly and we have no way to read the return value of a properly-exited proc. We might as well support reading values out, it's a convenient pattern for cases where you don't want to rewrite the callee to shuffle its (singular) output through a channel.
Reporter | ||
Comment 1•15 years ago
|
||
On second thought, this is kinda weird since you have nothing to return on failure; it'd require transforming the return type to an option type or something.
Maybe this is pointless or too complex to bother with? It's pretty easy to just prohibit.
Summary: make it possible to spawn a proc that returns non-nil → make it possible to spawn a task that returns non-nil
Reporter | ||
Comment 2•15 years ago
|
||
Yeah, this is a bad plan. Let's prohibit fully. Added testcase to require it in 84dbe5fbdfc5. Closing this bug.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Group: servo
You need to log in
before you can comment on or make changes to this bug.
Description
•