Hi Ben,
On Wed, Feb 24, 2016 at 10:44 PM, Ben Coman <[hidden email]> wrote: On Thu, Feb 25, 2016 at 3:06 AM, Eliot Miranda <[hidden email]> wrote: It can be built simply above signalException:. So... Process class methods for instance creation forBlock: aBlockClosure priority: anInteger "Answer an instance of me that has suspended aContext at priority anInteger." <primitive: 19> "Simulation guard" | newProcess | (newProcess := self new) suspendedContext: [[[newProcess result: aBlockClosure value. false] on: ProcessRestart do: [:ex| true]] whileTrue. "Since control is now at the bottom there is no need to terminate (which runs unwinds) since all unwinds have been run. Simply suspend. Note that we must use this form rather than e.g. Processor suspendActive so that isTerminated answers true. isTerminated requires that if there is a suspended context it is the bottom-most, but using a send would result in the process's suspendedContext /not/ being the bottom-most." newProcess suspend] asContext; priority: anInteger. ^newProcess Process methods for process state change restart self signalException: ProcessRestart btw, The requirement for the fork in "[Transcript crShow: 'Work Is there a missing yield somewhere?
_,,,^..^,,,_ best, Eliot |
Free forum by Nabble | Edit this page |