Skip to content

Comments

Add _dispatch_install_thread_detach_callback() on all platforms#841

Open
triplef wants to merge 1 commit intoswiftlang:mainfrom
triplef:expose-thread-detach-callback
Open

Add _dispatch_install_thread_detach_callback() on all platforms#841
triplef wants to merge 1 commit intoswiftlang:mainfrom
triplef:expose-thread-detach-callback

Conversation

@triplef
Copy link
Contributor

@triplef triplef commented Aug 12, 2024

_dispatch_install_thread_detach_callback() is currently only available on Android specifically to detach threads from the JVM. This patch removes the #ifdefs to add the callback on all platforms, and moves it up in _libdispatch_tsd_cleanup() to be called before TSD cleanup.

This enables libraries/apps to release thread-local data when threads managed by libdispatch exit.

See gnustep/libs-base#428.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant