mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
SSH: Core::Wait() is moved out of the critical section. (MT fix)
git-svn-id: svn://ultimatepp.org/upp/trunk@13617 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e3a4d6c37a
commit
31191dc3f7
1 changed files with 2 additions and 5 deletions
|
|
@ -68,10 +68,7 @@ bool Ssh::Do(Gate<>& fn)
|
|||
Check();
|
||||
if(!ssh->init)
|
||||
ssh->init = Init();
|
||||
if(ssh->init && fn())
|
||||
return false;
|
||||
Wait();
|
||||
return true;
|
||||
return !ssh->init || !fn();
|
||||
}
|
||||
|
||||
bool Ssh::Run(Gate<>&& fn)
|
||||
|
|
@ -81,7 +78,7 @@ bool Ssh::Run(Gate<>&& fn)
|
|||
ssh->start_time = msecs();
|
||||
|
||||
while(Do(fn))
|
||||
;
|
||||
Wait();
|
||||
|
||||
ssh->status = IDLE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue