On Thu, 2007-08-23 at 09:14 -0400, Alan Conway wrote:
> ...
> Not so. The Serializer will continue dispatch in the calling thread
> *unless* doing so might cause tasks to be processed out of order - i.e.
> if there is already a thread doing a dispatch or there are already tasks
> queued up. (If it doesn't its a bug.) It was designed to allow reader
> threads to continue all the way thru when possible, and to return
> (rather than blocking on a mutex as before) when not possible.
>
> The intent was to avoid reader threads blocking, and it was too
> successful. As soon as a thread hits a busy serializer, it drops its
> load and returns. As long as the serializer is busy, the read thread are
> now doing nothing but decoding, which of course they can do faster than
> the broker can process and encode them.
The code is designed to do as described but the Serializer is created:
Serializer(false)
which has the effect of disabling the "straight-through-if-possible"
logic.
Andrew