At Wed, 28 Sep 2016 21:15:49 -0400,
Victor J. Orlikowski wrote:
> 
> On Wed, Sep 28, 2016, at 08:32 PM, IWAMOTO Toshihiro <iwam...@valinux.co.jp> 
> wrote:
> > Another option is wrap top-level msg_parser functions with
> > eventlet.timeout.Timeout, which amounts to much less amount of code
> > but might be ugly and unpopular.
> >
> 
> So - depends on how tight the loop is.
> 
> I looked into using a Timeout around handler executions, in order to
> prevent poorly-authored handlers from hanging up the primary controller
> loop.
> 
> The problem is - if the code wrapped in a Timeout doesn't do anything to
> co-operatively yield, the Timeout never has a chance to fire.
> 
> This behavior is listed as a caveat, about the middle of the page here:
> 
> http://eventlet.net/doc/modules/timeout.html
> 
> I suspect that the parsing code is fairly tight, and doesn't perform any
> operations that would implicitly yield. Too bad; "it'd be nice" if we
> could use a Timeout.

Oh, I forgot eventlet was a cooperative thread implementation.
Thanks, and sorry for noise.
We'll need to go the long and boring way.

--
IWAMOTO Toshihiro

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to