与Backgroundworker一起工作 [英] Working with Backgroundworker

查看:113
本文介绍了与Backgroundworker一起工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何停止非枚举过程,例如在
中加载数据库

How to Stop Non Enumerated Processes such as loading database in
CancleAsync() method?

推荐答案

您以一种或另一种方式问了四遍.如果您正在执行任务(例如加载数据库),则无法很好地停止它.您也许可以杀死线程,但是尚不清楚会造成什么损害.当一行代码正在执行时,您不能使另一行代码在同一线程中执行.我建议您不要一遍又一遍地问同样的事情.如果您还有其他问题,请编辑帖子以使问题更清楚.如果您必须再次发布,请等待一天,然后再发布一次.我们不会为您工作,我们也不会更快地回答,同样的人也会因为您的无礼而感到恼火,并且在再次询问之前您不会查看答案.
You asked this four times, one way or another. If you''re in the middle of a task, such as loading a database, you can''t stop it nicely. You may be able to kill a thread, but it''s not clear what damage that will do. When a line of code is executing, you can''t make another line of code execute in the same thread. I suggest you stop asking the same things over and over. If you have more questions, edit your post to make your question clearer. Wait a day before posting again, if you must post again at all. We don''t work for you, and we won''t answer quicker, the same people will just get annoyed that you are rude, and that you don''t look at the answers before asking again.


这篇关于与Backgroundworker一起工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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