-
Notifications
You must be signed in to change notification settings - Fork 84
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
First re_thread_init()
always fails with EALREADY
#403
Comments
BTW, |
For the main thread
|
There is no "main thread" in our case. There can be any number of threads that are running separate instances of event loop.
My suggestion is to remove the fallback. Require the caller of |
Removing the fallback would break existing applications, like the baresip android app. Can you try this PR: #404 |
The check at this line:
re/src/main/main.c
Line 1192 in d9834e8
always succeeds for the first
re_thread_init
call becausere_init
that is called fromre_once
sets the TLS pointer to the newly createdre
instance.Suggestion: drop
re_global
and don't set TLS inre_init
. Reformulatere_init
to work as a factory function for creating are
context without setting it anywhere. Make the caller (e.g.re_thread_init
) set it to TLS.The text was updated successfully, but these errors were encountered: