with_friend(uri) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/drb/drb.rb, line 1108
    def self.with_friend(uri)
      friend = DRb.fetch_server(uri)
      return yield() unless friend
      
      save = Thread.current['DRb']
      Thread.current['DRb'] = { 'server' => friend }
      return yield
    ensure
      Thread.current['DRb'] = save if friend
    end
Register or log in to add new notes.