Permalink
Browse files

removed useless mutex in director event logging

mutex is used inside event task

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
  • Loading branch information...
1 parent bbb21bd commit b7fd02052cabf4f5ce3ce28cf381dab00d9259ee caleb miles committed with dmitriy kalinin Jan 3, 2014
Showing with 2 additions and 5 deletions.
  1. +2 −5 bosh-director/lib/bosh/director/event_log.rb
@@ -26,17 +26,14 @@ class Log
def initialize(io = nil)
@logger = CustomLogger.new(io || StringIO.new)
@last_stage = Stage.new(self, 'unknown', [], 0)
- @last_stage_lock = Mutex.new
end
def begin_stage(stage_name, total = nil, tags = [])
- stage = Stage.new(self, stage_name, tags, total)
- @last_stage_lock.synchronize { @last_stage = stage }
+ @last_stage = Stage.new(self, stage_name, tags, total)
end
def track(task_name = nil, &blk)
- last_stage = @last_stage_lock.synchronize { @last_stage }
- last_stage.advance_and_track(task_name, &blk)
+ @last_stage.advance_and_track(task_name, &blk)
end
# Adds an error entry to the event log.

0 comments on commit b7fd020

Please sign in to comment.