users@grizzly.java.net

Re: WG: Re: WG: Re: WG: Re: Asynchronous Request Processing with TCPIP

From: John ROM <snake-john_at_gmx.de>
Date: Sat, 05 Jul 2008 17:42:32 +0200

Hi Jeanfrancois,
thank you very much.
I tried it out but have a little problem.
I call Ctx.suspend() and use it with a new Thread.
Problem is I cannot call resume() because the grizzly
workerthread (protocolParser) might still be using the same context.

Hmmh so might be best for me to give the new Thread a clone of
context? But I always try to avoid copying (-:






> -----Ursprüngliche Nachricht-----
> Von: Jeanfrancois Arcand [mailto:Jeanfrancois.Arcand_at_Sun.COM]
> Gesendet: Freitag, 4. Juli 2008 21:18
> An: users_at_grizzly.dev.java.net
> Betreff: Re: WG: Re: WG: Re: Asynchronous Request Processing with TCPIP
>
>
>
> John ROM wrote:
> > Hi Jeanfrancois,
> >>> So more a Context.detach(); So I wonder if you could do somethink
> like:
> >>> suspend() {
> >>> detach();
> >>> ctx.setKeyRegistrationState(KeyRegistrationState.NONE))
> >> Here you means KeyRegistrationState,REGISTER, right?
> >>
> > Ups yes for sure!
> >> So in your case I would think you can do:
> >>
> >> Context.suspend();
> >> Thread.detach();
> >
> > // We suspend, but we still want to get OP_READ event
> >> ctx.setKeyRegistrationState(KeyRegistrationState.REGISTER);
> >
> >
> >> How does it sound? Let me know as I will make sure I can support your
> >> scenario before commiting the code :-)
> > Terrific!
> >
> > No super many thanks!!,
> > It will make my code cleaner!!
>
> Done. Available as 1.8.2-SNAPSHOT :-)
>
> A+
>
> -- Jeanfrancois
>
>
>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx