Seth Kurtzberg wrote:

Thanks for the info.  I don't compare thread IDs.  At the moment I merely print 
out the thread ID in a trace message.  Shortly I will be using the thread ID 
when a need arises to kill a thread.  It sounds like the rollover is harmless 
for these situations.

When you talk about comparing thread IDs, are you thinking that one might compare two thread IDs to 
see which one is more recently spawned?  I can see where you might have a situation where you would 
compare thread IDs to determine whether two somehow related values "belong" in some sense 
to the same thread.  I'm curious about why one might compare thread IDs in such a way that the 
rollover would cause the comparison to produce the "wrong" answer.

The runtime doesn't currently check that it isn't reusing thread IDs, so if the thread ID wraps around it is possible that you end up with two threads with the same ID, so then comparing IDs becomes meaningless.

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to