-
Notifications
You must be signed in to change notification settings - Fork 26
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 single thread limitation on mac. #163
Conversation
@@ -197,7 +207,8 @@ void actor_save_context(encore_actor_t *actor, ucontext_t *ctx) | |||
context *old = this_context; | |||
this_context = pop_context(actor); | |||
assert_swap(ctx, &this_context->ctx); | |||
this_context = old; | |||
tail(old); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi albert, why is this line better than the old this_context = old
? Does it matter or do you prefer to have it in a function?
Kiko, I believe this is a trick to force the C compiler to omit more resilient code for reading the thread-local variable. |
I would strongly suggest to have a comment that states so. |
@albertnetymk tested on mac 10000 times running However, My tests for this PR:
|
It's consistent with the runs on Linux. |
Updated the tail function name to make it more explicit on osx for thread local variables. |
@albertnetymk you are right, I'll merge this PR and create an issue for the tasks |
Remove single thread limitation on mac.
No description provided.