Skip to content

Commit

Permalink
Save signaled callback and execute it outside of @synchronized block
Browse files Browse the repository at this point in the history
  • Loading branch information
kekekeks committed Feb 26, 2020
1 parent 2d7b559 commit 87c08c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions native/Avalonia.Native/src/OSX/platformthreading.mm
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,14 @@ -(Signaler*) init

-(void) perform
{
ComPtr<IAvnSignaledCallback> cb;
@synchronized (self) {
_signaled = false;
if(_parent != NULL && _parent->SignaledCallback != NULL)
_parent->SignaledCallback->Signaled(0, false);
if(_parent != NULL)
cb = _parent->SignaledCallback;
}
if(cb != nullptr)
cb->Signaled(0, false);
}

-(void) setParent:(PlatformThreadingInterface *)parent
Expand Down

0 comments on commit 87c08c7

Please sign in to comment.