]> git.openfabrics.org - ~shefty/librdmacm.git/commit
rstream: Set rsocket nonblocking if set to async operation
authorSean Hefty <sean.hefty@intel.com>
Wed, 16 May 2012 22:23:41 +0000 (15:23 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 16 May 2012 23:00:46 +0000 (16:00 -0700)
commitc6f0bc6d40f36d80e1c42459e719630c9206a73b
tree8f6ed845f1d4f512d6113d3b4ff5776c7e330fc4
parent7761e53b55e08d9424ae2f6cb6baecbe2a1db856
rstream: Set rsocket nonblocking if set to async operation

If asynchronous use is specified (use of poll/select), set the
rsocket to nonblocking.  This matches the common usage case for
asynchronous sockets.

When asynchronous support is enabled, the nonblocking/blocking
test option determines whether the poll/select call will block,
or if rstream will spin on the calls.

This provides more flexibility with how the rsocket is used.
Specifically, MPI often uses nonblocking sockets, but spins on
poll/select.  However, many apps will use nonblocking sockets,
but wait on poll/select.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
examples/rstream.c