bug: unstable myThreadId in GHC 6.6.1

Don Stewart dons at galois.com
Fri Apr 10 12:36:32 EDT 2009


Could you send a full example we can compile and test?
This is only a fragment.

bulat.ziganshin:
> Hello glasgow-haskell-users,
> 
> i've looked for this bug in Trac but don't found anything. so:
> 
> startGUI action = runInBoundThread $ do
>   unsafeInitGUIForThreadedRTS
>   myThreadId >>= writeIORef guiThread
>   action >>= widgetShowAll
>   mainGUI
> 
> guiThread  =  unsafePerformIO$ newIORef$ error "undefined GUI::guiThread"
> 
> 
> Later in the same thread i ask for myThreadId and get different value.
> interesting that value returned in startGUI is 23 while later values
> are about 7000. probably this reflects total amount of threads created
> so far
> 
> so that's the problem. Win API call returns constant thread number
> (that looks natural since the thread is bound). so either:
> 
> 1) it's feature - please mention this in docs
> 2) it was fixed since 6.6.1
> 3) we need full-scale bugreport using 6.10.2
> 
> 
> -- 
> Best regards,
>  Bulat                          mailto:Bulat.Ziganshin at gmail.com
> 
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


More information about the Glasgow-haskell-users mailing list