在这种情况下,请使用线程和计时器 [英] at which case use thread and timer

查看:54
本文介绍了在这种情况下,请使用线程和计时器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我希望线程和时间之间存在差异,因此我在窗口服务中使用线程或计时器的时间.


i want differece bettween thread and time so i use in window services at wht time use thread or timer

推荐答案

它们是完全不同的.计时器在对当前线程执行操作之前等待,一个线程与其他代码同时运行.这个问题与ASP.NET没有关系(最好通过搜索这些术语来获得更完整/冗长的解释来最好地回答). ASP.NET是永远不要使用计时器或线程的地方.
They are totally different. A timer waits before doing something on the current thread, a thread runs concurrently with the other code running. This question has nothing to do with ASP.NET ( and could be best answered by googling the terms to get more complete/lengthy explanations ). ASP.NET is the one place to NEVER use timers or threads.


在提问时,您需要遵循一些简单的逻辑.

请查看我过去的回答:
类与封装之间的区别是什么编程 [ ^ ].

那么,如何添加一个有效的问题呢?请参阅以下讨论:
如何问一个好问题? [ ^ ].

您遵循这些了吗?

代码项目常见问题解答 [如何使用Google和其他查找编程的技巧帮助 [ ^ ]
在论坛中发布问题的一些准则 [ ^ ].

—SA
You need to follow some simple logic when asking questions.

Please see my past answer:
what is the difference between the class and encapsulation in programming[^].

So, how to add a valid question? Please see this discussion:
How to ask a good question?[^].

Did you follow these?

Code Project Questions and Answers FAQ[^]
How to Use Google and Other Tips for Finding Programming Help[^]
Some guidelines for posting questions in the forums[^].

—SA


这篇关于在这种情况下,请使用线程和计时器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆