#4457: Way to determine if code is running in thread fixed on capability
------------------------------+---------------------------------------------
Reporter: mitar | Owner: simonmar
Type: feature request | Status: closed
Priority: high | Milestone: 7.4.1
Component: Compiler | Version: 6.12.3
Resolution: fixed | Keywords:
Testcase: | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
------------------------------+---------------------------------------------
Changes (by simonmar):
* status: new => closed
* resolution: => fixed
Comment:
GHC HEAD has this in `GHC.Conc`:
{{{
-- | returns the number of the capability on which the thread is currently
-- running, and a boolean indicating whether the thread is locked to
-- that capability or not. A thread is locked to a capability if it
-- was created with @forkOnIO@.
threadCapability :: ThreadId -> IO (Int, Bool)
}}}
and as part of the proposal to add `forkOnIO` and friends, this will be
exported via `Control.Concurrent` too (perhaps with a different name, I
haven't decided yet).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4457#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs