- live browsing of Self object memory -

lobby mixinsschedulerCalls

for synchronization
        All low-level critical sections are performed in the context of
        the scheduler so that they cannot be interrupted.  To achieve
        this, a user process transfers to the scheduler with _Yield and
        passes a function code (selector).  The scheduler usually calls
        back to perform the actual work.
        Note: this is only for low-level synchronization; use semaphores
        for other applications.			       -Urs 1/92

CopyDowns: vector

CreatorPath: mixins schedulerCalls

Module: process

criticalDoFast:InScheduler:ToScheduler: =
( 
    "A speed optimization for common paths; if fastBlk returns
    true, no process switches will be performed.  fastBlk
    is executed with signals turned off; it is intended for
    short, trivial critical sections only.
    Note: 'action' can be a block, but it will be evaluated here
          (if needed) to produce an object. The scheduler will
          later send this object the message 'doAction'.
          Typically, the 'doAction' method does the same as
          'schedBlk'."
    scheduler inScheduler ifTrue: schedBlk False: [
        (scheduler blockSignals: fastBlk) ifFalse: [_Yield: action value].
    ])
performInScheduler:IfInside: = ( scheduler inScheduler ifTrue: blk False: [_Yield: action])