[Neo-report] r1787 vincent - /trunk/neo/client/app.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 17 09:43:27 CET 2010


Author: vincent
Date: Wed Feb 17 09:43:26 2010
New Revision: 1787

Log:
Move ThreadContext initialisation to "clear" method.

Those "properties" were put in _threads_dict (cf __setattr__), but only for
the thread who instantiates ThreadContext (until next "clear" call from/for
that thread, where they are not inserted in cleared version).

Modified:
    trunk/neo/client/app.py

Modified: trunk/neo/client/app.py
==============================================================================
--- trunk/neo/client/app.py [iso-8859-1] (original)
+++ trunk/neo/client/app.py [iso-8859-1] Wed Feb 17 09:43:26 2010
@@ -52,13 +52,6 @@
 
     def __init__(self):
         super(ThreadContext, self).__setattr__('_threads_dict', {})
-        self.txn_info = 0
-        self.history = None
-        self.node_tids = {}
-        self.node_ready = False
-        self.conflict_serial = 0
-        self.asked_object = 0
-        self.object_stored_counter = 0
 
     def __getThreadData(self):
         thread_id = get_ident()
@@ -91,6 +84,13 @@
             'txn_voted': False,
             'txn_finished': False,
             'queue': Queue(0),
+            'txn_info': 0,
+            'history': None,
+            'node_tids': {},
+            'node_ready': False,
+            'conflict_serial': 0,
+            'asked_object': 0,
+            'object_stored_counter': 0,
         }
 
 





More information about the Neo-report mailing list