I would like to find a way to combine these two lines:
cancellationToken.WaitHandle.WaitOne() |> ignore
waitHandle.WaitOne() |> ignore
whichever happens first would let the execution flow continue. Can this be done?
I would like to find a way to combine these two lines:
cancellationToken.WaitHandle.WaitOne() |> ignore
waitHandle.WaitOne() |> ignore
whichever happens first would let the execution flow continue. Can this be done?
I assume you could put the the two handles in an array and then wait on it. Something like:
Note: I have not tried to compile or run this code.