Hi helloyattie,

On 8/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

  Recently I use MINA in my project and I am puzzled with the following
problem.
  First I only send data with a thread and a IoSession, it works fine; But
When I create an other thread and send some synchronize pkg with the same
IoSession, a problem happens: if some data is being send while a
synchronize pkg is sent, the synchronize pkg is always replace the data
pkg
which is sent at the same time. It looks like that the IoSession.write()
method is not synchronized and if tow thread invoke the same
IoSession.write(), something wrong happens.
  Can you give me any suggestions? I am very anxious to know this.


Which version of MINA are you using?

Is there any rule that synchronize msg should come earlier than data msg?
Then you cannot send them from different threads.  You have to synchronize
by yourself because it is protocol implementation dependent.

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

Reply via email to