Skip to content

Commit

Permalink
Changed: new blockchain update request awaiting logic
Browse files Browse the repository at this point in the history
  • Loading branch information
xiphon committed Mar 14, 2017
1 parent 07b17af commit 88be326
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Units/PascalCoin/UNetProtocol.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3016,10 +3016,10 @@ procedure TThreadGetNewBlockChainFromClient.BCExecute;
begin

while true do begin;
repeat
while InterLockedExchange(TNetData.NetData.FBlockChainUpdateRequests, 0) = 0 do begin
RTLeventWaitFor(TNetData.NetData.FBlockChainUpdateEvent);
RTLeventResetEvent(TNetData.NetData.FBlockChainUpdateEvent);
until InterLockedExchange(TNetData.NetData.FBlockChainUpdateRequests, 0) <> 0;
end;

if Terminated then begin
break;
Expand Down

0 comments on commit 88be326

Please sign in to comment.