Hi Blaze,

On 10/13/07, blazespinnaker <[EMAIL PROTECTED]> wrote:
>
> Hi folks, this is a newbie question .. wanted to confirm how messages get
> sent out when push from multiple threads.
>
> Does the text line protocol Codec synchronize them?  My understanding from
> reading the code that it does, but I might have missed something.
>
> Right now my code is saying the same thing.. basically, it doesn't release
> the monitor until a full textline is pushed through the protocol codec.
>
> Is that correct?

Any codecs that access any shared resources need synchronization.
Otherwise, you usually don't need any synchronization.  As you see,
TextLineEncoder and TextLineDecoder don't have any synchronization
block, because the ProtocolCodecFilter acquires a lock before calling
a decoder.  Please note that ProtocolCodecFilter doesn't acquire a
lock for encoders because most encoders don't need any
synchronization.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to