示例#1
0
 public static ReceiveLoop EnableSuspendResume(this ReceiveLoop loop, Inbox inbox)
 {
     return(loop.Receive <Suspend>(pause =>
     {
         // we are going to only receive a continue until we get it
         inbox.Receive <Resume>(x =>
         {
             // repeat the loop now
             loop.Continue();
         });
     }));
 }
示例#2
0
 public static ReceiveLoop Receive <T>(this ReceiveLoop loop, Consumer <T> consumer)
 {
     return(loop.Receive <T>(x => consumer));
 }