Thank you very much for the fast response

-----Original Message-----
From: Emmanuel Lecharny [mailto:[email protected]] 
Sent: Tuesday, August 10, 2010 9:46 AM
To: [email protected]
Subject: Re: Question about IoSession.write() synchronization

  On 8/10/10 7:49 AM, Guy Itzhaki wrote:
> Dear mina team and users,
>
>
>
> I have a multi threaded application, my threads as shown below are
> responsible for sending data to the client.
>
> Here is a scrap of the thread code:
>
>
>
> public class MessageSender implements Runnable
>
> {
>
>      private final IoSession session;
>
>      public void run()
>
>      {
>
>              /* do some business... */
>
>              session.write(message);
>
>
>      }
>
> }
>
>
>
> The server creates multiple such threads with the same IoSession.
>
> My question is, does mina guarantees that the server will send the
> messages one after another and not mixed up.
>
> Please note that the session.write()is invoked from 2 different threads
> concurrently. I really don't care about the sending order, all I care is
> that the client will get one message after another.
Messages will be enqueued before being sent back to the client. You have 
a guarantee that once a session has been established between a client 
and the server, then only one thread will process the queue for this client.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com



Click here to report this message as SPAM: 
http://vsp.ateranetworks.com/ReportSpam.php?sid=79dcfefe4f6adf7554e04cbca593cc50_1798c382d175165a79cdef862eadcf4f
-- Powered by ATERA Networks --


Reply via email to