本文整理汇总了C#中Timer.shutdown方法的典型用法代码示例。如果您正苦于以下问题:C# Timer.shutdown方法的具体用法?C# Timer.shutdown怎么用?C# Timer.shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer.shutdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: run
private static int run(string[] args, Ice.Communicator communicator)
{
Timer timer = new Timer();
communicator.getProperties().setProperty("TestAdapter1.Endpoints", "default -p 12010:udp");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.Size", "5");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.SizeMax", "5");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.SizeWarn", "0");
communicator.getProperties().setProperty("TestAdapter1.ThreadPool.Serialize", "0");
Ice.ObjectAdapter adapter1 = communicator.createObjectAdapter("TestAdapter1");
adapter1.add(new HoldI(timer, adapter1), communicator.stringToIdentity("hold"));
communicator.getProperties().setProperty("TestAdapter2.Endpoints", "default -p 12011:udp");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.Size", "5");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.SizeMax", "5");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.SizeWarn", "0");
communicator.getProperties().setProperty("TestAdapter2.ThreadPool.Serialize", "1");
Ice.ObjectAdapter adapter2 = communicator.createObjectAdapter("TestAdapter2");
adapter2.add(new HoldI(timer, adapter2), communicator.stringToIdentity("hold"));
adapter1.activate();
adapter2.activate();
communicator.waitForShutdown();
timer.shutdown();
timer.waitForShutdown();
return 0;
}