You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by zswallow <zs...@126.com> on 2009/12/06 02:24:32 UTC
Who is the author of AbstractPollingIOProcessor.java?
I use mina-2.0.0-RC1 to recv media data(TCP/IP) and immediately send it out.
I set 2 NioProcessor, one is for recving data, the other is for sending the recved data.
My recv NioProcessor works well. the "select" function will be wakeup more than 25 times per second. But there is sth wrong with my send NioProcessor. Sometimes it will keep sleep for 1 second, although there is lots of data waiting to be sent out.
But if I set 1 NioProcessor, recving and sending data shared this processor, then everything is OK. The problem didn't happen any more.
I found the reason is that, there is something wrong in thread synchronization.
I changed the code, and everything works well.
1 In AbstractorPollingIoProcessor.java : private void flush(long currentTime) function
I remove "if(flushedAll && ....)
scheduleFlush(session);
"
2 In AbstractorPollingIoProcessor.java: public final void flush(T session) function
I changed "if(scheduleFlush(session) && needsWakeup)"
to "if(needsWakeup && scheduleFlush(session))"
if it is a bug? Anyone can help me with this, or contact the author of AbstractPollingIOProcessor.java?
Re: Who is the author of AbstractPollingIOProcessor.java?
Posted by Emmanuel Lcharny <el...@gmail.com>.
zswallow a écrit :
> Hi,
> Actually I use Red5, and Red5 use Mina to transfer TCP/IP data.
> So I'm not famillier with Mina.
> But This is really a problem, I really need somebody who are familiar with AbstractorPollingIoProcessor.java to check it.
>
I already said it once, and will say it twice : we need code to
understand what you really are doing with MINA. Right now, the
explaination you gave is a bit cryptic.
Give us something we can grok, we will try our best to give you a clue
about what's going on.
Re:Re: Who is the author of AbstractPollingIOProcessor.java?
Posted by zswallow <zs...@126.com>.
Hi,
Actually I use Red5, and Red5 use Mina to transfer TCP/IP data.
So I'm not famillier with Mina.
But This is really a problem, I really need somebody who are familiar with AbstractorPollingIoProcessor.java to check it.
在2009-12-07?06:08:38,"Emmanuel?Lecharny"?<el...@gmail.com>?写道:
>Hi,
>
>more?inline
>
>zswallow?a?écrit?:
>>?I?use?mina-2.0.0-RC1?to?recv?media?data(TCP/IP)?and?immediately?send?it?out.?
>>?I?set?2?NioProcessor,?one?is?for?recving?data,?the?other?is?for?sending?the?recved?data.
>>???
>
>Hmmm...?Can?you?post?the?code???It's?a?bit?strange,?I?don't?see?how?you?
>can?dedicate?a?IoProcessor?for?send.
>
>Why?aren't?you?using?a?Connector?in?this?case??
>
><snip/>
>>?if?it?is?a?bug??
>Difficult?to?tell,?just?create?a?JIRA?and?attach?the?offending?code.
>
>
>>?Anyone?can?help?me?with?this,?or?contact?the?author?of?AbstractPollingIOProcessor.java?
>>???
>You?are?on?the?right?place.?No?need?to?contact?someone?specifically,?as?
>this?code?has?been?modified?many?times?by?many?people?(7?at?least)...
>
Re: Who is the author of AbstractPollingIOProcessor.java?
Posted by Emmanuel Lecharny <el...@gmail.com>.
Hi,
more inline
zswallow a ��crit :
> I use mina-2.0.0-RC1 to recv media data(TCP/IP) and immediately send it out.
> I set 2 NioProcessor, one is for recving data, the other is for sending the recved data.
>
Hmmm... Can you post the code ? It's a bit strange, I don't see how you
can dedicate a IoProcessor for send.
Why aren't you using a Connector in this case ?
<snip/>
> if it is a bug?
Difficult to tell, just create a JIRA and attach the offending code.
> Anyone can help me with this, or contact the author of AbstractPollingIOProcessor.java?
>
You are on the right place. No need to contact someone specifically, as
this code has been modified many times by many people (7 at least)...