Comments (4)
BTW, re_global
can become dangling since the re
context may be deleted by re_thread_close
or thread termination. For example, this breaks libre_close
.
from re.
For the main thread re_thread_init
should not be called, only for additional worker threads.
re_global
is needed as fallback for re_thread_enter
see https://github.com/baresip/re/wiki/Development-(re-usage)#thread-safety-for-non-re-threads
from re.
There is no "main thread" in our case. There can be any number of threads that are running separate instances of event loop.
re_global
is needed as fallback forre_thread_enter
My suggestion is to remove the fallback. Require the caller of re_thread_enter
specify the re
instance he wants to use until re_thread_leave
. Ultimately, there would be no global state in libre (other than TLS, perhaps), and the caller would be able to explicitly create and destroy re
contexts and specify the context he wants to operate on. Basically, this would properly allow for multi-instance use of libre.
from re.
Removing the fallback would break existing applications, like the baresip android app. Can you try this PR: #404
from re.
Related Issues (20)
- Warning: ABI Check failed - bump ABI version HOT 2
- LibreSSL build is broken HOT 3
- Compile errors when USE_UNIXSOCK is off
- pthread_getname_np() too few arguments to function call, expected 2, have 1 HOT 2
- Possible problem with FreeBSD check HOT 1
- Build error on Windows ARM HOT 3
- Add support for building static and/or dynamic library HOT 8
- cmake: add libre namespace export HOT 2
- CMake generated project VS2017 compilation error HOT 1
- 100rel broken in 2 ways HOT 3
- Sec-WebSocket-Protocol header missing in Upgrade response HOT 5
- websocket connection gets closed after a few seconds
- ice_connchk_h gets called multiple times HOT 1
- websocket messages should be sent as text instead of binary HOT 3
- BYE is not sent for calls over websocket HOT 1
- sip/transp: websock_accept proto is missing
- Mingw warnings HOT 4
- vidmix: looks like new locking produces a potential deadlock HOT 2
- An error occurred when compiling baresip-libre with vcpkg HOT 2
- mingw cmake 3.27 openssl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re.