Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support set stack size and task name for go! macro #40

Closed
Xudong-Huang opened this issue Mar 16, 2018 · 2 comments · Fixed by #54
Closed

support set stack size and task name for go! macro #40

Xudong-Huang opened this issue Mar 16, 2018 · 2 comments · Fixed by #54
Labels

Comments

@Xudong-Huang
Copy link
Owner

Example

go!(|| {
    println!("task with default stack size");
});

go!(|| {
    println!("task with specific stack size");
},
4096);

go!(|| {
    println!("task with specific stack size and name");
},
4096, String::from("task3"));
@killme2008
Copy link

go! macro already has three branches, it's not a good choice to add more branches. I think we can introduce a new macro such as go_with! may be a better choice:

go_with!(4096, || {
    println!("task with default stack size");
});
go_with!(4096,"task", || {
    println!("task with default stack size");
});

If you agree, i can create a PR.

@Xudong-Huang
Copy link
Owner Author

Thanks! This is good. Let's first add a support for normal coroutine creation.

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

Successfully merging a pull request may close this issue.

2 participants