Project

General

Profile

Actions

Feature #4243

closed

[PATCH] DRb should not forefully close connections on DRb#stop_service

Added by zimbatm (zimba tm) about 13 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
[ruby-core:34185]

Description

=begin
When DRb#stop_service is called, all connections get terminated by
calling Thread.kill on them. It means that all code that is invoked trough
DRb must be exception-safe. This poses the same kind of issues we have
with Kernel#timeout.

This patch changes the behavior or DRb to only kill the accepting
thread, so that no new connections are made. New queries are also
rejected. DRb#stop_service is synchronous and waits for all child-threads
to terminate.

Please note that this patch is quite old, so I may have forgotten some details
of it. It was posted on rubyforge at http://rubyforge.org/tracker/?func=detail&atid=1698&aid=14438&group_id=426.
The new version got imported into git and applies on top of ae3666b38fd723231c0bbc3c33f4603b6e0e0ef0 or svn r30363 (not sure about the patch format)

This patch can easily be back-ported to 1.8.x since drb.rb hasn't changed much.

Cheers,
zimbatm
=end


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0