1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00
JUCE/modules/juce_core/native
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
..
java Update licensing information 2024-04-16 11:39:35 +01:00
javacore Update licensing information 2024-04-16 11:39:35 +01:00
juce_AndroidDocument_android.cpp Android: Remove unnecessary SDK version checks 2025-03-19 11:06:17 +00:00
juce_BasicNativeHeaders.h MinGW: Remove support 2024-06-27 18:10:21 +01:00
juce_CFHelpers_mac.h macOS: Simplify the CoreGraphics pointer types and add some new ones 2024-08-09 17:20:36 +01:00
juce_CommonFile_linux.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_ComSmartPtr_windows.h WebBrowserComponent: Fix leak on Windows 2025-01-07 11:21:05 +00:00
juce_Files_android.cpp Android: Remove unnecessary SDK version checks 2025-03-19 11:06:17 +00:00
juce_Files_linux.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Files_mac.mm Deprecations: Add ignore deprecation warning macros 2024-11-27 11:07:04 +00:00
juce_Files_windows.cpp Deprecations: Add ignore deprecation warning macros 2024-11-27 11:07:04 +00:00
juce_IPAddress_posix.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_JNIHelpers_android.cpp Platform: Remove compatibility checks for Android 20 and earlier 2024-07-03 13:45:37 +01:00
juce_JNIHelpers_android.h Typeface: Enable advanced colour glyph rendering on Android 2025-06-16 16:59:55 +01:00
juce_Misc_android.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_NamedPipe_posix.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Network_android.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Network_curl.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Network_linux.cpp Network: Make Linux networking code robust against user headers that already end with CRLF 2025-06-19 14:45:30 +01:00
juce_Network_mac.mm Network: Fix potential deadlock in macOS WebInputStream 2025-06-30 19:46:19 +01:00
juce_Network_windows.cpp MinGW: Remove support 2024-06-27 18:10:21 +01:00
juce_ObjCHelpers_mac.h ObjC: Silence Wcast-function-type-mismatch warnings when building with Wextra for x86_64 2025-04-14 13:05:22 +01:00
juce_ObjCHelpers_mac_test.mm Update licensing information 2024-04-16 11:39:35 +01:00
juce_PlatformTimer_generic.cpp HighResolutionTimer: Add fallback implementation for Windows 2024-10-29 13:06:28 +00:00
juce_PlatformTimer_windows.cpp HighResolutionTimer: Add fallback implementation for Windows 2024-10-29 13:06:28 +00:00
juce_PlatformTimerListener.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_Process_mac.mm Update licensing information 2024-04-16 11:39:35 +01:00
juce_Registry_windows.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_RuntimePermissions_android.cpp Android: Remove unnecessary SDK version checks 2025-03-19 11:06:17 +00:00
juce_SharedCode_intel.h Update licensing information 2024-04-16 11:39:35 +01:00
juce_SharedCode_posix.h Prevent Thread::sleep waking up on POSIX systems when receiving signals 2025-04-10 16:23:13 +02:00
juce_Strings_mac.mm Update licensing information 2024-04-16 11:39:35 +01:00
juce_SystemStats_android.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_SystemStats_linux.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_SystemStats_mac.mm macOS: Add initial macOS 26 suport 2025-06-10 20:15:58 +01:00
juce_SystemStats_wasm.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_SystemStats_windows.cpp SystemStats: Silence function-cast warnings 2025-03-03 14:41:31 +00:00
juce_ThreadPriorities_native.h Formatting: Improve consistency of static inline word ordering 2024-09-06 15:40:39 +00:00
juce_Threads_android.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Threads_linux.cpp Update licensing information 2024-04-16 11:39:35 +01:00
juce_Threads_mac.mm Platform: Remove compatibility checks for macOS 10.10 2024-07-02 18:06:27 +01:00
juce_Threads_windows.cpp Make building with MinGW a compiler error 2024-11-22 14:43:18 +00:00