Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何Long Polling在 c# 代码中实现。我在谷歌中没有找到任何东西。也许有一个示例代码?
Long Polling
对不起我的英语,提前谢谢!
while(true) { //CHECK IF WORK DONE AND NEED TO BREAK //YES ? break; //NO ? Thread.Sleep(1000); }
这是轮询实施的时间。但是当我们考虑到巨大的流量和长时间运行的任务时,阻塞线程是不好的。