[Zope-CVS] CVS: Products/ExternalMount - __init__.py:1.2

Shane Hathaway shane@cvs.zope.org
Wed, 28 Aug 2002 13:49:03 -0400


Update of /cvs-repository/Products/ExternalMount
In directory cvs.zope.org:/tmp/cvs-serv9374

Modified Files:
	__init__.py 
Log Message:
Workaround for a bad interaction between ZEO and mounted databases: if
the main database is not a ZEO client, the unpatched version of
asyncore.loop() gets run instead of ThreadedAsync's monkey-patched version.
The real problem is ThreadedAsync, but for now we can just make sure
the patched version of the asyncore.loop() gets run all the time by
importing ThreadedAsync early.


=== Products/ExternalMount/__init__.py 1.1.1.1 => 1.2 ===
--- Products/ExternalMount/__init__.py:1.1.1.1	Wed Aug 21 16:11:25 2002
+++ Products/ExternalMount/__init__.py	Wed Aug 28 13:49:02 2002
@@ -83,7 +83,15 @@
 # 
 ##############################################################################
 
+# importing ThreadedAsync has the side effect of patching asyncore so
+# that loop callbacks get invoked.  You need this to
+# mount a ZEO client connection if the main database is not a ZEO client.
+# Otherwise ZEO never receives the message telling it to start use the
+# main async loop.
+import ThreadedAsync
+
 import ExternalMount
+
 
 def initialize(context):