[ruby-cvs:54826] akr:r47678 (trunk): * lib/drb/drb.rb: Support graceful shutdown.

akr at ruby-lang.org akr at ruby-lang.org
Mon Sep 22 02:06:06 JST 2014


akr	2014-09-22 02:06:05 +0900 (Mon, 22 Sep 2014)

  New Revision: 47678

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

  Log:
    * lib/drb/drb.rb: Support graceful shutdown.
      (DRbTCPSocket#initialize): Create a pipe for shutdown notification.
      (DRbTCPSocket#close): Invoke close_shutdown_pipe.
      (DRbTCPSocket#close_shutdown_pipe): New private method.
      (DRbTCPSocket#accept): Use accept_or_shutdown.
      (DRbTCPSocket#accept_or_shutdown): New private method which returns
      nil on shutdown.
      (DRbServer#stop_service): Use shutdown instead of Thread#kill.
      (DRbServer#run): Break infinite loop when main_loop returns nil.
      (DRbServer#main_loop): @protocol.accept may return nil.
    
    * lib/drb/ssl.rb: Follow above change.
    
    * lib/drb/unix.rb: Ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/drb/drb.rb
    trunk/lib/drb/ssl.rb
    trunk/lib/drb/unix.rb


More information about the ruby-cvs mailing list