Skip to content

Conversation

crabtw
Copy link
Contributor

@crabtw crabtw commented May 22, 2013

This fixes segmentation fault of new rt tests.
For example

use core::rt::test::*;
use core::rt::comm::*;
use core::cell::Cell;

fn main() {
    do run_in_newsched_task {
        let (port, chan) = oneshot::<~int>();
        let port_cell = Cell(port);
        do spawntask_immediately {
            assert!(port_cell.take().recv() == ~10);
        }
        chan.send(~10);
    }
}

@brson
Copy link
Contributor

brson commented May 22, 2013

Thanks!

bors added a commit that referenced this pull request May 22, 2013
This fixes segmentation fault of new rt tests.
For example
```
use core::rt::test::*;
use core::rt::comm::*;
use core::cell::Cell;

fn main() {
    do run_in_newsched_task {
        let (port, chan) = oneshot::<~int>();
        let port_cell = Cell(port);
        do spawntask_immediately {
            assert!(port_cell.take().recv() == ~10);
        }
        chan.send(~10);
    }
}
```
@bors bors closed this May 22, 2013
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 3, 2021
Rustup

Pulling in AST changes

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants