[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - marshal.py:1.9

Guido van Rossum guido@python.org
Sat, 28 Sep 2002 21:32:57 -0400


Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv16224

Modified Files:
	marshal.py 
Log Message:
Add a comment explaining that sharing a pickler is not thread-safe.
No jokes about sharing pickles please. :-)


=== ZODB3/ZEO/zrpc/marshal.py 1.8 => 1.9 ===
--- ZODB3/ZEO/zrpc/marshal.py:1.8	Sat Sep 28 21:25:53 2002
+++ ZODB3/ZEO/zrpc/marshal.py	Sat Sep 28 21:32:57 2002
@@ -25,6 +25,7 @@
 
     def encode(self, msgid, flags, name, args):
         """Returns an encoded message"""
+        # (We used to have a global pickler, but that's not thread-safe. :-( )
         pickler = cPickle.Pickler()
         pickler.fast = 1
         return pickler.dump((msgid, flags, name, args), 1)