[Zope] RE: Zope 2.4.3 crashing continually - asyncore replacement?

Jin Choi jsc@alum.mit.edu
Wed, 12 Dec 2001 17:35:56 -0500


Problem solved. Thanks for your help. Looking through old mailing list 
archives, I see that this is a fairly well-known problem (but still not 
fixed in either asyncore.py or in Python!) Anyway, I took some code from 
ZEO's asyncwrap.py and modified asyncore. This really should get fixed 
once and for all....

*** asyncore.py~	Sun Sep 30 15:03:19 2001
--- asyncore.py	Wed Dec 12 17:30:21 2001
***************
*** 50,55 ****
--- 50,56 ----
   import select
   import socket
   import sys
+ import errno

   import os
   if os.name == 'nt':
***************
*** 83,89 ****
                   r.append (fd)
               if obj.writable():
                   w.append (fd)
!         r,w,e = select.select (r,w,e, timeout)

           if DEBUG:
               print r,w,e
--- 84,97 ----
                   r.append (fd)
               if obj.writable():
                   w.append (fd)
!         while 1:
!             try:
!                 r,w,e = select.select (r,w,e, timeout)
!             except select.error, err:
!                 if err[0] != errno.EINTR:
!                     raise
!             else:
!                 break

           if DEBUG:
               print r,w,e



On Wednesday, December 12, 2001, at 05:30 PM, Richard Jones wrote:
>
>
> Hrm - I've seen something about an asyncore replacement floating around 
> one
> of these zope lists... maybe it's to blame... does anyone know anything 
> about
> it?
>
>
>     Richard
>