diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-09-07 18:10:24 -0400 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-09-07 18:10:24 -0400 |
commit | 5a2ad9c577ea835ad5a5b0fbeea4b153d756de6b (patch) | |
tree | 9ee337b4337aa4ea9a0abb3682aed87869d7cc6c | |
parent | 4c32ddbf3dbda730ef80cba433497ee2e695266d (diff) |
combox.events: fixed deadlock issue.
-rw-r--r-- | combox/events.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/combox/events.py b/combox/events.py index 49a1c15..23d869f 100644 --- a/combox/events.py +++ b/combox/events.py @@ -386,14 +386,13 @@ class NodeDirMonitor(LoggingEventHandler): print "Okay, %s (%s) was actually modified." % (cb_filename, event.dest_path) self.silo.node_rem('file_deleted', cb_filename) - with self.lock: - self.silo.node_set('file_modified', file_cb_path) - num = self.silo.node_get('file_modified', file_cb_path) - if num == self.num_nodes: - decrypt_and_glue(file_cb_path, self.config) - # update db. - self.silo.update(file_cb_path) - self.silo.node_rem('file_modified', file_cb_path) + self.silo.node_set('file_modified', file_cb_path) + num = self.silo.node_get('file_modified', file_cb_path) + if num == self.num_nodes: + decrypt_and_glue(file_cb_path, self.config) + # update db. + self.silo.update(file_cb_path) + self.silo.node_rem('file_modified', file_cb_path) return |