jruby
https://github.com/jruby/jruby
Ruby
JRuby, an implementation of Ruby on the JVM
XMLRPC::Client#proxy_async
Similar to XMLRPC::Client#proxy, however can be called concurrently and
use a new connection for each request. In contrast to the corresponding
method without the +_async+ suffix, which use connect-alive (one
connection for all requests).
Note, that you have to use Thread to call these methods concurrently.
The following example calls two methods concurrently:
Thread.new {
p client.proxy_async("michael.add", 4, 5)
}
Thread.new {
p client.proxy_async("michael.div", 7, 9)
}Edit
git clone [email protected]:jruby/jruby.git
cd jruby
open lib/ruby/stdlib/xmlrpc/client.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-XMLRPC--Client-proxy_async-for-pr
# Commit to gitgit add lib/ruby/stdlib/xmlrpc/client.rbgit commit -m "better docs for XMLRPC::Client#proxy_async"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-XMLRPC--Client-proxy_async-for-pr
hub pull-request
# Celebrate!