On 22/12/2010 11:41, Simon Marlow wrote:
Ticket:
FYI, I just pushed the following: Wed Mar 30 03:05:04 PDT 2011 Simon Marlow <marlowsd@gmail.com> * Export the affinity API from Control.Concurrent: forkOn and friends. forkOn :: Int -> IO () -> IO ThreadId forkOnWithUnmask :: Int -> ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId getNumCapabilities :: IO Int threadCapability :: ThreadId -> IO (Int, Bool) Following discussion on the libraries list, I renamed forkOnIO to forkOn. In due course we might want to also rename forkIO to fork. I left the Int argument as it is, it's quite useful to be able to specify a number to be interpreted modulo the actual number of processors. I also used the term "capability" consistently. It might not be the best choice, but we have to pick something. Cheers, Simon