mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-09 22:14:13 +09:00
B #1941: ActionManager threads counter not decreased
This commit is contained in:
1 parent
1013195609
commit
aaa488fefa
1 file changed
+9
-7
@@ -196,14 +196,16 @@ class ActionManager
|
||||
|
||||
if action[:threaded]
|
||||
thread = Thread.new {
|
||||
action[:method].call(*action[:args])
|
||||
begin
|
||||
action[:method].call(*action[:args])
|
||||
ensure
|
||||
@threads_mutex.synchronize {
|
||||
@num_running -= 1
|
||||
delete_running_action(action[:id])
|
||||
|
||||
@threads_mutex.synchronize {
|
||||
@num_running -= 1
|
||||
delete_running_action(action[:id])
|
||||
|
||||
@threads_cond.signal
|
||||
}
|
||||
@threads_cond.signal
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
action[:thread] = thread
|
||||
|
||||
Reference in new issue
Block a user