It's for a game server where actions need to be synchronized with read/write
in order to make sure everything is done in order. Not everything is
executed from read/write methods, so I cannot ensure a message is being
received/sent and look at some queue for this.

That's why I want to execute something on the same thread a read/write event
is done for a specific session.


Jonathan Valliere-3 wrote
> I just read the last email Kevin wrote.
> 
> Kevin, if you could execute something on the IO processor thread; you
> understand that It would be a deferred action that could only happen after
> the IO processor is done?  Maybe you could explain the reason why you want
> to do this?
> 
> On Thu, Feb 14, 2019 at 10:40 AM Emmanuel Lécharny <

> elecharny@

> >
> wrote:
> 
>> I still don't get it.
>>
>> Your IoHandler will be called everytime an event occurs (message
>> received, message written, session created/closed/idling, exception).
>> You have the opportunity to execute some action at this moment.
>>
>>
>> Beside that, I don't see a use case. I'm probably missing something...
>> Unless what you want to do is to have another session to be called while
>> processing an event, using the thread you are in ?
>>
>>
>> On 14/02/2019 16:21, Jonathan Valliere wrote:
>> > There are some examples in the unit tests which accomplish this by
>> creating
>> > a Client and Server connection.  I don't believe there is a true
>> loopback
>> > implementation in Mina without going through the OS networking.
>> >
>> > On Thu, Feb 14, 2019 at 10:16 AM kevintjuh93 <

> kevin_kal@

> >
>> wrote:
>> >
>> >> Hi guys,
>> >>
>> >> What I mean is that I want a way to execute something for an IoSession
>> in
>> >> the same thread the I/O events run. I figured a good way would be to
>> 'fake'
>> >> an incoming message, called a loopback packet. Like write a message to
>> >> 'yourself'.
>> >>
>> >> I rather like to avoid using an ExecutorFilter or a lock.
>> >>
>> >>
>> >>
>> >> --
>> >> Sent from:
>> >>
>> http://apache-mina.10907.n7.nabble.com/Apache-MINA-Developer-Forum-f6809.html
>> >>
>>





--
Sent from: 
http://apache-mina.10907.n7.nabble.com/Apache-MINA-Developer-Forum-f6809.html

Reply via email to