8000 Ensure that TestClock methods are thread-safe by kyri-petrou · Pull Request #9408 · zio/zio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ensure that TestClock methods are thread-safe #9408

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

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

kyri-petrou
Copy link
Contributor

/fixes #9385

fiber.status.flatMap {
case done @ Fiber.Status.Done => ZIO.succeed(map.updated(fiber.id, done))
case suspended @ Fiber.Status.Suspended(_, _, _) => ZIO.succeed(map.updated(fiber.id, suspended))
case _ => ZIO.fail(())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
case _ => ZIO.fail(())
case _ => Exit.failUnit

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm tackling a lot of these in #9404, just need to iron out a few more things w.r.t the TestClock before I mark it as ready for review. Just wanted to have this PR separate since there is an open issue for it.

If that's okay, I'll leave it as is for this PR

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds fine

@kyri-petrou kyri-petrou merged commit ea8282d into zio:series/2.x Dec 16, 2024
18 checks passed
@kyri-petrou kyri-petrou deleted the thread-safe-test-clock branch December 16, 2024 13:10
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.

TestClock hangs on parallelism
3 participants
0