1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00
JUCE/modules/juce_core
reuk 21b0cd4663
Network: Fix potential deadlock in macOS WebInputStream
Regarding didComplete():

When a WebInputStream is destroyed, the thread of execution will wait in
SharedSession::removeTask() until the task is no longer present in the
list of all active tasks. If multiple threads are all waiting in
removeTask(), then all of those threads should wake when the set of
active tasks changes. Waking only a single thread may result in
deadlocks, as that thread's task may not have completed successfully.
Then, the thread that woke up will be forced to sleep again and may not
get another chance to wake.

Regarding didBecomeInvalid():

Normally, didBecomeInvalid() will only be called after the
SharedSession's destructor. If the destructor is running, we may assume
that no other thread can access the SharedSession, so using notify_one()
in didBecomeInvalid() should be sufficient to wake up the destructor's
thread. However, there's a chance that the NSURLSession may be
invalidated unexpectedly (i.e. before the SharedSession's destructor
runs), in which case there may still be threads waiting in removeTask().
In this scenario we need to notify_all() so that all waiting threads are
able to wake and make progress.
2025-06-30 19:46:19 +01:00
..
containers XmlElement: Add new API to allow iterating over attributes 2025-06-19 14:45:30 +01:00
detail iOS: Fix compiling juce_audio_devices when juce_graphics isn't added 2025-05-16 18:08:54 +02:00
files Add missing JUCE_API annotations 2025-04-10 17:28:17 +01:00
json Javascript: Move javascript implementation into a separate module 2024-11-07 09:53:10 +00:00
logging Update licensing information 2024-04-16 11:39:35 +01:00
maths Random: Add some extra data race tests 2024-11-27 11:07:04 +00:00
memory Deprecations: Add ignore deprecation warning macros 2024-11-27 11:07:04 +00:00
misc Fonts: Add OpenType feature support 2025-06-17 12:38:20 +01:00
native Network: Fix potential deadlock in macOS WebInputStream 2025-06-30 19:46:19 +01:00
network Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
serialisation Update licensing information 2024-04-16 11:39:35 +01:00
streams Update licensing information 2024-04-16 11:39:35 +01:00
system macOS: Add initial macOS 26 suport 2025-06-10 20:15:58 +01:00
text GlyphArrangement: Use portable string trimming 2025-06-03 16:12:00 +01:00
threads HighResolutionTimer: Prevent a race condition in the unit tests 2025-05-09 16:44:01 +01:00
time UnitTestRunner: Fix some tests that could fail on 32 bit systems 2024-11-05 20:50:04 +00:00
unit_tests UnitTestRunner: Move javascript tests into an independent category 2024-11-07 09:54:42 +00:00
xml XmlElement: Add new API to allow iterating over attributes 2025-06-19 14:45:30 +01:00
zip Core: Prevent a preprocessor definition leak in zlib 2025-06-10 16:13:33 +01:00
juce_core.cpp Zlib: Update JUCE sources to support new zlib version 2025-02-25 12:47:13 +00:00
juce_core.h Fonts: Add OpenType feature support 2025-06-17 12:38:20 +01:00
juce_core.mm Update licensing information 2024-04-16 11:39:35 +01:00
juce_core_CompilationTime.cpp Core: Move __DATE__ and __TIME__ into a dedicated TU 2024-06-07 09:23:23 +01:00