Andrew Stromnov wrote:
> On Feb 19, 10:51 pm, "Robert Brewer" <
fuman...@aminus.org> wrote:
> > Andrew Stromnov wrote:
> > > Ubuntu 7.10
> > > Python 2.5.1,
> > > cherrypy (trunk r1894)
> > > psyco (trunk r51624)
> >
> > > #!/usr/bin/env python
> > > # -*- coding: utf-8 -*-
> >
> > > from cherrypy.restsrv.wspbus import Bus
> >
> > > import psyco
> > > psyco.full()
> >
> > > if __name__ == '__main__':
> > > bus = Bus()
> > > bus.start()
> > > print "started"
> > > bus.block()
> >
> > Hrmmmmm, yeah. I don't think any of the current core devs are going
> > to care enough to go digging into psyco's internals to find out why
> > this is. So as it stands, psyco will be unsupported. But if you
> > (or anyone else) wants to pursue it, open a ticket, throw theories
> > around, and submit patches, you're more than welcome.
>
> SIGTERM and SIGHUP also doesn't work under Ubuntu Linux. Under Windows
> Vista all works as expected.
>
> After adding pure Python function (such as print 'ping') to wait()
> loop in Bus() class, all signals are handled properly.
>
> """
>
http://psyco.sourceforge.net/psycoguide/bugs.html :
> The compiled machine code does not include the regular polling done by
> Python, meaning that a KeyboardInterrupt will not be detected before
> execution comes back to the regular Python interpreter. Your program
> cannot be interrupted if caught into an infinite Psyco-compiled loop.
> (This could be fixed if requested.)
> """
>
> workaround:
> implicitly forbid wait() method compiling:
> """
> import psyco
> psyco.cannotcompile(Bus.wait)
> psyco.full()
> """
Terrific!
So could we permanently fix the signal issue by just doing "dummy=None"
in the Bus.wait loop (with a good comment explaining why)?
And would you rather just have commit access? ;)
Robert Brewer
fuma...@aminus.org