Commit ce162b67 authored by Vincent Pelletier's avatar Vincent Pelletier

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).

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1787 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9acced19
......@@ -52,13 +52,6 @@ class ThreadContext(object):
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 @@ class ThreadContext(object):
'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,
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment