Changes between Version 83 and Version 84 of NewGhciDebugger


Ignore:
Timestamp:
Apr 10, 2007 4:35:13 PM (8 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewGhciDebugger

    v83 v84  
    445445}}}
    446446
     447The two MVars, `statusMVar` and `breakMVar` are used like so:
     448 * When runStmt begins to execute an expression for the first time it forks the expression thread, and then waits on the `statusMVar`.
     449 * If the expression thread completes execution with an exception or with a final value, it fills in `statusMVar` with the appropriate `Status` value, which wakes up the GHCi thread. The `Status` is turned into a `RunResult` which gets propogated back to the command line as usual.
     450 * If the expression thread does not complete, but hits a breakpoint, it fills in the `statusMVar` with an appropriate `Break` value, and then waits on the `breakMVar`. The GHCi thread is woken up because of the write to `statusMVar`, and the `RunResult` is propogated back to the command line (this time it is a `RunBreak`).
     451 * When the user decides to continue execution after a breakpoint the GHCi thread fills in the `breakMVar`, thus waking up the expression thread, and then the GHCi thread waits on the `statusMVar` again. The whole process continues until eventually the expression thread completes its evaluation.
     452
    447453=== Inspecting values ===
    448454