Skip to content

Cover std::task::yield in Rust Tasks and Communication Tutorial #8461

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

Closed
Sodel-the-Vociferous opened this issue Aug 12, 2013 · 6 comments
Closed

Comments

@Sodel-the-Vociferous
Copy link
Contributor

Since tasks are cooperatively scheduled, yielding is pretty important when using tasks with long running threads. It'd be good if the task and communication tutorial covered std::task::yield a bit, or at least mentioned it, to warn the gung-ho.

@pnkfelix
Copy link
Member

part of #11755

@sanxiyn
Copy link
Member

sanxiyn commented Jan 24, 2014

Triage. In #8560, yield was reserved as a keyword and std::task::yield was renamed to std::task::deschedule.

@steveklabnik
Copy link
Member

Is this still relevant? Tasks have changed a lot recently, I am unsure what the current state is.

@alexcrichton
Copy link
Member

In general the entire tasks tutorial needs a revamp most likely, it hasn't been scrutinized in a long time (I think).

@steveklabnik
Copy link
Member

Seems good, I will consider this issue to be 'revamp the task tutorial' then.

@thestinger
Copy link
Contributor

#17325 means this will become a very niche function. It will almost never be the right tool to reach for.

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

No branches or pull requests

6 participants