mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trustin Lee" <trus...@gmail.com>
Subject Re: about TextLineDecoder's ByteBuffer initialization
Date Mon, 15 Jan 2007 03:46:24 GMT
On 1/12/07, James Im <im-james@hotmail.com> wrote:
> I'm looking at TextLineDecoder (in mina 1.0.1) and I see that
> "ByteBuffer delimBuf" is initialized on demand. I'm wondering is this is
> a thread safe initialization.
> If the method decodeNormal(...) can be called by 2 threads at the same
> time, I think that their could be some visibility problems. In that case
> I guess that the delimBuf could be assigned twice or more times.

decoder is invoked serially, so it shouldn't be a problem, unless you
inserted a filter that doesn't maintain the order of events.

what we call human nature is actually human habit
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message