예제 #1
0
 public ScheduledOverlapped()
 {
     if (s_isWindows)
     {
         _nativeOverlapped = (new Overlapped()).UnsafePack(
             Fx.ThunkCallback(new IOCompletionCallback(IOCallback)), null);
         _postDelegate = PostIOCP;
     }
     else
     {
         _postDelegate = PostNewThread;
     }
 }
예제 #2
0
 public ScheduledOverlapped()
 {
     nativeOverlapped = (new Overlapped()).UnsafePack(
         Fx.ThunkCallback(new IOCompletionCallback(IOCallback)), null);
 }
 public void SetCompletionCallback(Action <object> callback, object state)
 {
     _timerFiredCallback = Fx.ThunkCallback(callback);
     _timerFiredState    = state;
 }