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

Remove Send bounds from scopes. #5

Closed
wants to merge 7 commits into from
Closed

Conversation

Zoxc
Copy link

@Zoxc Zoxc commented Feb 1, 2020

No description provided.

@Zoxc Zoxc requested a review from cuviper February 1, 2020 21:28
Copy link
Member

@cuviper cuviper left a comment

Choose a reason for hiding this comment

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

We should probably reconsider this upstream -- see rayon-rs#562. Can you also add some description motivating this change in your case?

where
FUNC: FnOnce() -> R,
{
let result = self.execute_job_closure(func);
self.steal_till_jobs_complete(owner_thread);
in_worker(|owner_thread, _| {
Copy link
Member

Choose a reason for hiding this comment

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

It seems unfortunate to inject yet another job just to wait for completion. Maybe we could add another latch type that acts like a combination of CountLatch and LockLatch, raising the Condvar when the count is zero. Then job_completed_latch would need to be an enum of either CountLatch or this new thing, depending on what context it's called from.

Copy link
Author

Choose a reason for hiding this comment

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

This doesn't matter for rustc, since it always runs in a worker.

@Zoxc
Copy link
Author

Zoxc commented Feb 1, 2020

I want to run some code which refers to !Send types in parallel with some other code which do use Send types. Specifically name resolution (with !Send) and gated feature checking in rustc.

@nikomatsakis
Copy link

Closing this pull request as Zoxc is stepping back from compiler development; see rust-lang/team#316.

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