• simonmar's avatar
    [project @ 2002-01-22 13:54:22 by simonmar] · 33a7aa8b
    simonmar authored
    Deadlock is now an exception instead of a return status from
    The current behaviour is as follows, and can be changed if necessary:
    in the event of a deadlock, the top main thread is taken from the main
    thread queue, and if it is blocked on an MVar or an Exception (for
    throwTo), then it receives a Deadlock exception.  If it is blocked on
    a BLACKHOLE, we instead send it the NonTermination exception.  Note
    that only the main thread gets the exception: it is the responsibility
    of the main thread to unblock other threads if necessary.
    There's a slight difference in the SMP build: *all* the main threads
    get an exception, because clearly none of them may make progress
    (compared to the non-SMP situation, where all but the top main thread
    are usually blocked).
RtsAPI.c 10.8 KB