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

Prevent STM waking up threads blocked on threadDelay #143

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Feb 14, 2024

Closes #142

@amesgen amesgen marked this pull request as ready for review February 14, 2024 12:09
@nfrisby
Copy link
Contributor

nfrisby commented Feb 14, 2024

Some good news: this fixes my direct "repro".

Some bad news: I'm seeing a different test failure now, so I'll try to debug that promptly to see if it's my own mistake that is masking more issues like this one.

Copy link
Collaborator

@coot coot left a comment

Choose a reason for hiding this comment

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

Thanks @amesgen, that's a clean fix.

This is actually half of the work 😁, would you like to do the IOSimPOR part too?

@nfrisby
Copy link
Contributor

nfrisby commented Feb 14, 2024

This fix works for me! My new GSM tests are passing locally. My PR is unblocked (other than needing a CHaP release, etc---I've merely locally backported Esgen's patch to the last io-sim release and used a source-repository-package in my local cabal.project for now).

@coot
Copy link
Collaborator

coot commented Feb 14, 2024

I'll cut a new hackage release, once #141 is merged.

The first argument of `unblockThreads`, `onlySTM`, indicates that only threads
actually blocked on STM are woken up. This change correctly sets it to `True`
when necessary.

Co-authored-by: Armando Santos <armandoifsantos@gmail.com>
Copy link
Collaborator

@coot coot left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @amesgen 🎉

@coot coot added this pull request to the merge queue Feb 15, 2024
Merged via the queue into main with commit 080f518 Feb 15, 2024
17 checks passed
@coot coot deleted the issue-142 branch February 15, 2024 17:24
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.

a registerDelay timeout is truncating a threadDelay call
4 participants