Simon Marlow wrote:
Neal Alexander wrote:
Thomas DuBuisson wrote:
    It seems like we could get some priority based scheduling (and still
    be slackers) if we allow marked green threads to be strictly
    associated with a specific OS thread (forkChildIO?).


I think you want the GHC-only GHC.Conc.forkOnIO

GHC.Conc.forkOnIO is helpful but doest work in this case - it doesn't attach them to the same OS thread.

But it does attach the thread to a particular "virtual CPU" in the GHC RTS (we call them "capabilities"), with the intention that a virtual CPU corresponds more or less to a real CPU core.

Cheers,
    Simon

Yea, but you still have the problem with FFI that uses TLS don't you? What about having a forkOnOS version with processor affinity? Or is there a way to "upgrade" a thread created with forkOnIO to Bound.


I have a thread with soft real-time requirements that cooperatively yields and uses thread local state. Right now there just doesn't seem to be any options.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to