On 03/06/2013 04:44 AM, Rob Godfrey wrote:
On 5 March 2013 21:10, Rafael Schloming <r...@alum.mit.edu> wrote:
On Tue, Mar 5, 2013 at 11:24 AM, Ted Ross <tr...@redhat.com> wrote:
[.. snip ..]

It isn't really possible to have "put" cause messages to be eventually sent
without a background thread, something we don't currently have.
I think it's this that is what makes me find the API slightly odd.
That put is an asynchronous operation is fine, but the fact that the
only way to get work to occur is for a synchronous operation to be
called seems a little screwy.

This is exactly right. The API behaves in a surprising way and causes reasonable programmers to write programs that don't work. For the sake of adoption, we should fix this, not merely document it.

If I understand correctly, right now an application programmer cannot
actually write an "asynchronous publisher", every so often they would
have to call some form of synchronous operation.

At the very least it would seem to suggest there might be call for a
"do some work but don't block" function in the API.  This could either
take an aggressive strategy of flushing everything that it can to the
wire, or it could attempt to optimize into larger transmission units.

-- Rob

Reply via email to