Skip to content

Conversation

@carllerche
Copy link
Contributor

Attempt to clarify the problem with using a set structure to store tasks.

This question has come up a bunch; e.g. #670.

Continuation of #689 since I no longer have access to that branch.

@carllerche
Copy link
Contributor Author

I updated the URL. I still believe this is a net win and the question still gets asked in the Tokio gitter.

///
/// In this case, the idea is that whenever a `start_send` is called on one of
/// the channel's send handles, if the channel is at capacity, the current task
/// is stored in a `TaskSet`. Then, when capacity is available, a task is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is TaskSet an actual type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a hypothetical.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps "a task set" (like you use elsewhere) would be clearer that TaskSet isn't an actual type?

@MajorBreakfast
Copy link
Contributor

Looks good

@MajorBreakfast MajorBreakfast merged commit b695882 into rust-lang:0.1 Aug 31, 2018
@MajorBreakfast
Copy link
Contributor

And about the discussion about whether to put such an explanation in the docs: IMO if people are asking this a lot, then it's appropriate to put such an explanation in the docs for the type.

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