Skip to content

Export getThreadId

Sometimes one needs to convert ThreadId to Int (e.g in hashable). GHC.Conc.Sync is obscure enough place to expose this implementation detail.

Quick search shows that many do it wrongly (e.g. hashable), as the rts C definition has changed https://hackage-search.serokell.io/?q=rts_getThreadId

#22705 is related. (base itself could use CApiFFI for importing ThreadId# primitives).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information