Enhancement #2151

RSB documentation should include callAsync() examples

Added by S. Schulz over 6 years ago. Updated over 6 years ago.

Status:ResolvedStart date:01/07/2015
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:Documentation
Target version:rsb-0.12

Description

It would be nice to have a brief example for callAsync() rpc calls (c++ and probably all others).

Just a short code snippet like for normal rpc calls but with the async case:
http://docs.cor-lab.org/rsb-manual/trunk/html/examples-basic.html#remote-procedure-calls

a good example could be a timeout for a rpc call.
i found it out on my own but it would have saved me some time (and others as well)

Associated revisions

Revision 11cfb79e
Added by J. Moringen over 6 years ago

Added non-blocking call in examples/server/client.cpp

refs #2151

  • examples/server/client.cpp (header): updated copyright
    (main): added non-blocking example involving DataFuture and
    callAsync()

Revision 28ee23bd
Added by J. Moringen over 6 years ago

Added non-blocking call in examples/ClientExample.java

refs #2151

  • examples/ClientExample.java (ClientExample.main): added non-blocking
    example involving Future and callAsync()

Revision fe318dd3
Added by J. Moringen over 6 years ago

Changes for manual in examples/patterns/request-reply/client.lisp

refs #2151

  • examples/patterns/request-reply/client.lisp (header): updated
    copyright

Revision dd00c1ec
Added by J. Moringen over 6 years ago

Added/improved descriptions of non-blocking calls in example-basic.rst

fixes #2151

  • examples-basic.rst (Client): for C++ and Java, reference lines in
    example listings that demonstrate non-blocking calls; for CL, added
    description of non-blocking calls

Revision 701b27bf
Added by J. Moringen over 6 years ago

Added timeout unit comment in examples/server/client.cpp

refs #2151

  • examples/server/client.cpp: note in a comment that the timeout is
    specified in seconds

Suggested-by: Simon Schulz <>

Revision 32dafd0f
Added by J. Moringen over 6 years ago

Added timeout unit comment in examples/ClientExample.java

refs #2151

  • examples/ClientExample.java: note in a comment that the timeout is
    specified in milliseconds

Suggested-by: Simon Schulz <>

History

#1 Updated by J. Moringen over 6 years ago

  • Status changed from New to In Progress
  • Assignee changed from J. Wienke to J. Moringen
  • % Done changed from 0 to 40

#2 Updated by J. Moringen over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 40 to 100

#3 Updated by S. Schulz over 6 years ago

thanks!
One more thing: it would be nice to write down the timeout unit as a comment
as the format differs for the languages :-\

            System.out.println("Server replied: " + future.get(10000)); //timeout in ms
            std::cout << "Server replied: " << *future.get(10.0) << std::endl; //timeout passed in seconds


etc

Also available in: Atom PDF