mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
Static Calling
This commit is contained in:
@ -47,5 +47,4 @@ public class AsyncAwaiter<T> : INotifyCompletion
|
||||
callback = continuation;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -90,6 +90,16 @@ public class AsyncReply
|
||||
return result;
|
||||
}
|
||||
|
||||
public AsyncReply Timeout(int milliseconds, Action callback)
|
||||
{
|
||||
Task.Delay(milliseconds).ContinueWith(x =>
|
||||
{
|
||||
if (!resultReady && exception == null)
|
||||
callback();
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public object Wait(int millisecondsTimeout)
|
||||
{
|
||||
|
@ -40,5 +40,6 @@ public enum ExceptionCode : ushort
|
||||
NotAttached,
|
||||
AlreadyListened,
|
||||
AlreadyUnlistened,
|
||||
NotListenable
|
||||
NotListenable,
|
||||
ParseError
|
||||
}
|
||||
|
Reference in New Issue
Block a user