Hi Forms experts,
I've seen it's sort of possible to wait on events asynchronously with C# -- https://msdn.microsoft.com/en-us/library/hh873178(v=vs.110).aspx (note that the link is not being interpreted properly in the forums because of the brackets)
However, it looks like ThreadPool doesn't exist for Xamarin.
So to spell out what I'm trying to do here:
while(true) {
await WaitForEventToBeSet(someEvent); // someEvent auto-resets
DoWork();
}
Somewhere else in the code:
someEvent.Set();
The key is, I don't want to block while waiting for the event - I want to wait asynchronously. Is this possible?
Thanks a lot,
Mike