I have an asynchronous class with a StartProcessing()
method, that raises an int ResultReady()
event when it has finished processing. StartProcessing()
takes very little time.
I want to call this class synchronously. My pseudo-code should be something like:
Call StartProcessing()
Wait/sleep until result is ready
Return result
What design pattern is best for this? Can you please point me to a code example?