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

Simplify thread blocking tests #4059

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Simplify thread blocking tests #4059

merged 1 commit into from
Nov 26, 2024

Conversation

tiif
Copy link
Contributor

@tiif tiif commented Nov 25, 2024

Follow up from #3939 (comment) to simplify the thread blocking test.

@tiif
Copy link
Contributor Author

tiif commented Nov 25, 2024

@rustbot ready

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Nov 25, 2024
@RalfJung RalfJung changed the title Simplify thread blocking test Simplify thread blocking tests Nov 25, 2024
@RalfJung
Copy link
Member

What about the other tests doing similar things?

  • tests/fail-dep/libc/eventfd_block_read_twice.rs
  • tests/fail-dep/libc/eventfd_block_write_twice.rs

thread1.thread().unpark();
thread2.thread().unpark();
thread3.thread().unpark();
thread::yield_now();
Copy link
Member

Choose a reason for hiding this comment

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

This wouldn't even be needed. Calling thread1.join() will block the main thread, and thus move control to thread 1.

@RalfJung
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Nov 25, 2024
@tiif
Copy link
Contributor Author

tiif commented Nov 26, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Nov 26, 2024
@RalfJung
Copy link
Member

Looks good, thanks. :) Please squash.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Nov 26, 2024
@tiif
Copy link
Contributor Author

tiif commented Nov 26, 2024

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Nov 26, 2024
@oli-obk oli-obk added this pull request to the merge queue Nov 26, 2024
Merged via the queue into rust-lang:master with commit 7b10fd0 Nov 26, 2024
7 checks passed
@tiif tiif deleted the fixtest branch November 26, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting for a review to complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants