Skip to content

30-minute Introduction to Rust example does not compile #24569

Closed
@bhanderson

Description

@bhanderson

The example for concurrency on the 30-minute Intro does not compile and run.

use std::thread;

fn main() {
    let guards: Vec<_> = (0..10).map(|_| {
        thread::scoped(|| {
            println!("Hello, world!");
        })
    }).collect();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions