Interface PausableFiber

    • Field Detail

      • PAUSE_PENDING

        static final int PAUSE_PENDING
        This state is used to define when a Fiber has begun the process of pausing its operations. This is the intermedate period where the thread is no longer in the RUNNING status, but not yet to a PAUSED status.
        See Also:
        Constant Field Values
      • PAUSED

        static final int PAUSED
        This state is used to denote a paused, or otherwise suspended Fiber. When a Fiber is in this state it should not be preforming any work.
        See Also:
        Constant Field Values
      • RESUME_PENDING

        static final int RESUME_PENDING
        This state is used to denote a Fiber recovering from a paused state to a running status. During this status the Fiber is reinitializing any necessary internal elements to re-enter the RUNNING state.
        See Also:
        Constant Field Values
    • Method Detail

      • pause

        void pause()
        This method is used to suspend a currently running Fiber. When invoked the Fiber will begin the transition to a PAUSED status after changing its internal state, if applicable.
      • resume

        void resume()
        This method is used to resume a suspeneded Fiber. If the thread is already running then this method should have no effect on the current Fiber.