public void ActorModelUnit() { var batch = new ActorModel <int>(100, index => { foreach (var item in index) { Console.WriteLine(item); } Thread.Sleep(500); }); for (int i = 0; i < 400; i++) { batch.Post(i); } batch.Complete(true); Console.WriteLine("完成"); }