[project @ 1999-03-16 13:20:07 by simonm]
Improvements to the threading model. - asynchronous exceptions supported. - killThread# can now raise an exception in the specified thread. It's new type is killThread# :: ThreadId# -> Exception -> IO () High-level versions: killThread :: ThreadId -> IO () raiseInThread :: ThreadId -> Exception -> IO () (killThread raises a 'ThreadKilled' exception in the specified thread). If the thread has no exception handler, it is killed as before. Otherwise, the exception is passed to the innermost CATCH_FRAME and the thread is woken up if it was blocked. The current computation is suspended, instead of being replaced by the exception (as is the case with throw). Sending an exception to the current thread works too. - new primitive: myThreadId# :: IO ThreadId# and corresponding high-level version myThreadId :: IO ThreadId. - new primitive: yield# :: IO (), and yield :: IO (). - the TSO now contains a pointer to the resource currently blocked on (MVAR or BLACKHOLE_BQ). - Add a giant comment to TSO.h about what the various link fields are supposed to do, and invariants etc.
Showing
- ghc/compiler/prelude/PrimOp.lhs 39 additions, 19 deletionsghc/compiler/prelude/PrimOp.lhs
- ghc/includes/PrimOps.h 4 additions, 1 deletionghc/includes/PrimOps.h
- ghc/includes/TSO.h 40 additions, 3 deletionsghc/includes/TSO.h
- ghc/lib/exts/Exception.lhs 3 additions, 1 deletionghc/lib/exts/Exception.lhs
- ghc/lib/std/PrelConc.lhs 35 additions, 22 deletionsghc/lib/std/PrelConc.lhs
- ghc/lib/std/PrelGHC.hi-boot 2 additions, 0 deletionsghc/lib/std/PrelGHC.hi-boot
- ghc/rts/GC.c 11 additions, 10 deletionsghc/rts/GC.c
- ghc/rts/HeapStackCheck.h 1 addition, 0 deletionsghc/rts/HeapStackCheck.h
- ghc/rts/HeapStackCheck.hc 8 additions, 1 deletionghc/rts/HeapStackCheck.hc
- ghc/rts/PrimOps.hc 39 additions, 14 deletionsghc/rts/PrimOps.hc
- ghc/rts/Schedule.c 285 additions, 165 deletionsghc/rts/Schedule.c
- ghc/rts/Schedule.h 2 additions, 3 deletionsghc/rts/Schedule.h
- ghc/rts/StgMiscClosures.hc 4 additions, 1 deletionghc/rts/StgMiscClosures.hc
- ghc/rts/Storage.c 3 additions, 1 deletionghc/rts/Storage.c
- ghc/tests/Makefile 1 addition, 0 deletionsghc/tests/Makefile
- ghc/tests/concurrent/should_run/Makefile 4 additions, 2 deletionsghc/tests/concurrent/should_run/Makefile
- ghc/tests/concurrent/should_run/conc008.hs 12 additions, 0 deletionsghc/tests/concurrent/should_run/conc008.hs
- ghc/tests/concurrent/should_run/conc008.stdout 1 addition, 0 deletionsghc/tests/concurrent/should_run/conc008.stdout
- ghc/tests/concurrent/should_run/conc009.hs 10 additions, 0 deletionsghc/tests/concurrent/should_run/conc009.hs
- ghc/tests/concurrent/should_run/conc009.stderr 2 additions, 0 deletionsghc/tests/concurrent/should_run/conc009.stderr
Loading
Please register or sign in to comment