Skip to content

rts: fix OS thread naming in ticker

Nicolas Trangez requested to merge NicolasT/ghc:dedupe-pthread-setname into master

Since ee0deb80, the use of pthread_setname_np on Darwin was fixed when invoking createOSThread. However, the 'ticker' has some thread-creation code which doesn't rely on createOSThread, yet also uses pthread_setname_np.

This patch enforces all thread creation to go through a single function, which uses the (correct) thread-naming code introduced in ee0deb80.

It also includes some changes to fix some (I believe) potential lifetime issues introduced in ee0deb80, see ee0deb80 (comment 460080).

See: ee0deb80 See: #22206 (closed) See: !9066 (closed)

Edited by Nicolas Trangez

Merge request reports