Re:Set Timeout for any method in C#
by kossovsky on Thursday July 16, 2009 @09:55AM
(#707918)
callback is not good enough, it has to be a synchronous operation with ability to stop after specified number of milliseconds
[ Parent
| on HN ]
Sorry I am still not understanding the functionality you are expecting. If it has to be synchronous, it means that the caller is interested in the result. However, the caller can stop after a specified timeout and continue, which means that getting the result is not absolutely critical to the caller's functionality.
So then why is callback not an option? After all, it is the same as setting the timeout to zero and getting interrupted (or polling) at some point in the future.