dim eventhandle as New EventWaitHandle(False, EventResetMode.ManualReset) sub main doSomeAsync eventhandle.WaitOne() end sub sub wait handles class2.myEvent eventhandle.Set() end sub '------ class2 sub doSomeAsync Application.Current.Dispatcher.Invoke(Windows.Threading.DispatcherPriority.Background, doSomeGUIUpdates) '< -- this line blocks the execution raise myEvent end sub end class2
WaitOne
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)