On 03/13/2013 04:55 PM, Connor Poske wrote:
Thanks Gordon.
We do use the getAvailable() function. The problem is this solution
is only useful if you have exclusive access to the Sender. If thread
B pushes a message to the Sender in between Thread A's call to
getAvailble() and Send(), thread A is now blocked indefinitely,
assuming there was only 1 slot available on the Sender initially.
A potential work around is essentially a wrapper to Sender that
provides an exclusive lock to the caller on the underlying Sender,
and implements a timeout by checking getAvailable() until either
timeout occurs or there is available space.
Senders are pretty cheap (though there is a roundtrip or two on setup),
so another workaround is to create a distinct Sender object for each
thread. As far as the transfers on the wire go, for 0-10 at least there
will be little difference.
I would still request the timeout feature be added if I had such
powers :)
The request doesn't require much in the way of power :) By all means
create a JIRA - assign to me for now so it doesn't get 'lost' and I'll
do my best to get to it, though I can't make any promises regarding
timing yet.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]