[ruby-cvs:66735] ko1:r59557 (trunk): refactoring Fiber status.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Aug 10 10:47:13 JST 2017


ko1	2017-08-10 10:47:13 +0900 (Thu, 10 Aug 2017)

  New Revision: 59557

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59557

  Log:
    refactoring Fiber status.
    
    * cont.c: revisit fiber status.
      "FIBER_RUNNING" status represents fiber is resumed or suspended.
      This fix separate these two status explicitly.
      FIBER_CREATED: Just after Fiber.new. Not resumed yet.
      FIBER_RESUMED (new): Fiber#resumed. Now this fiber is running.
      FIBER_SUSPENDED (new): Suspended by Fiber.yield. Not running.
      FIBER_TERMINATED: Terminated.
    
      Add sevral assertions to check consistency with these status.
    
    * cont.c (fiber_status_set): added to change status.
    
    * cont.c (FIBER_xxx_P): added to check fiber status.

  Modified files:
    trunk/cont.c


More information about the ruby-cvs mailing list