Yes, it's me again.  Could there be an action in the Concurrent library
which returns the ThreadId for the current thread?  Argument for:
(1) this seems easy to implement.
(2) it can't be simulated using the other functions.  (At least, not so far
    as I can see.)
(3) if you want to write a lot of code that involves doing things to this
    thread (which seems rather likely to me), or identifying this thread in
    a unique way, you have to (a) get the ThreadID from the parent thread into
    this one (using an MVar say, ugh!) and then (b) haul it around as an
    argument all the time (ugh ugh!).  
I have purely selfish reasons for making this request; namely I have
a chunk of Haskell to maintain which makes heavy use of such a function, but
implements it via a _ccall which pokes around with GHC's internals.

Sorry to keep on about Concurrent, and if this is the wrong mailing list
for talking about the Hugs/GHC extensions do let me know.

Many thanks

George Russell

Reply via email to