One of the value of MINA is to provide simple programming model for
IoHandler : the code you need to write doesn't have to be thread safe
(except if you use a non ordered executor filter).

for your session, all the events are run by the same thread, no need
to use lock or concurrent structure.
but today in MINA3 it's not really true, the idle event is processed
by another thread, so the user need to think about the multi-threading
correctness.
--
Julien Vermillard :::: http://people.apache.org/~jvermillard/


On Fri, Oct 25, 2013 at 10:06 AM, Emmanuel Lécharny <elecha...@gmail.com> wrote:
> Le 10/25/13 9:59 AM, Julien Vermillard a écrit :
>> Hi,
>> Sorry for the MIA, I was quite busy (new baby).
>
> Congrats !!!
>>
>> I'm having some problems with MINA 3, some code can be run outsite of
>> the selector loop and force you to write correct conccurent code.
>>
>> For example :
>> * call session.write from another thread make the IOfilter chain
>> processing outside of the selector loop
>
> That's pretty normal. There is no reason the chain should be used only
> by the selector loop thread, we may have to write messages at any time.
>> * Idle event is detected and propagated by another thread (the thread
>> regulary chking the idle index)
>>
>> For the first, I'm not sure if we should address it or not, but for
>> the idle event, it would be easy to run the idle event processing code
>> from the IOSelectorLoop, by message passing the event thru a Queue and
>> triggering a selector wakeup (like it's done for session
>> registration).
>
> Not sure I understand the second part.
>
> Is that a problem at all ?
>
>
> --
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>

Reply via email to