Skip to content

Fix: thread specs must test Thread, not Fiber::ExecutionContext::Isolated#15909

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
ysbaddaden:fix/thread-specs-with-execution-contexts
Jun 18, 2025
Merged

Fix: thread specs must test Thread, not Fiber::ExecutionContext::Isolated#15909
straight-shoota merged 1 commit intocrystal-lang:masterfrom
ysbaddaden:fix/thread-specs-with-execution-contexts

Conversation

@ysbaddaden
Copy link
Collaborator

The intent is to test Thread and there's no need for an isolated context.

Fixes a couple issues when running the std specs that I only just noticed. For example pthread_mutex_destroy failing with EBUSY, or an exception not being re-raised (of course, we join the thread, but the exception got captured by the isolated context). The failures might have been introduced by a5fe0ae and 3c74705.

…ated

The intent is to test Thread, and there's no need for an isolated
context. This avoids a couple issues where we'd try to join the thread,
but we should instead wait on the context.
@ysbaddaden ysbaddaden self-assigned this Jun 17, 2025
@ysbaddaden ysbaddaden added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:multithreading labels Jun 17, 2025
@straight-shoota straight-shoota added this to the 1.17.0 milestone Jun 17, 2025
@straight-shoota straight-shoota merged commit 63650d7 into crystal-lang:master Jun 18, 2025
40 checks passed
@github-project-automation github-project-automation bot moved this from Review to Done in Multi-threading Jun 18, 2025
@ysbaddaden ysbaddaden deleted the fix/thread-specs-with-execution-contexts branch June 19, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:multithreading topic:stdlib:runtime

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants