#5055: STM Exception "BlockedIndefinitelyOnSTM" throws to wrong thread
---------------------------+------------------------------------------------
  Reporter:  guest         |          Owner:                  
      Type:  bug           |         Status:  closed          
  Priority:  normal        |      Milestone:                  
 Component:  Compiler      |        Version:  7.0.3           
Resolution:  wontfix       |       Keywords:  stm             
  Testcase:                |      Blockedby:                  
Difficulty:                |             Os:  Unknown/Multiple
  Blocking:                |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---------------------------+------------------------------------------------

Comment(by guest):

 I suppose I thought it would somehow be determined the following facts
 based on the exact TVars:

     blkB (threads blocked on "TVar b") [1]
     blkI (threads blocked on "TVar i") [2]
     refB (threads with references to TVar b) [1,2]
     refI (threads with references to TVar i) [2]

 And based on these facts it could, for each tvar with a thread blocked on
 it, send a signal to the thread if it is also the only thread with a
 reference.

 The current response seems necessary to deal with situations such as:

     blkA [1]
     blkB [2]
     refA [1,2]
     refB [1,2]

 Perhaps a hybrid could be built?  If all threads are STM blocked and there
 exists threads blocked on a TVar for which it has the only reference then
 send an exception to those threads.  Otherwise, send an exception to all
 the threads.  How practical is this?  (pretend for a moment that I would
 do the work, if that lie gets you to expand on the topic more ;-) )

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5055#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to