社区
分析与设计
帖子详情
关于 多线程 abort 问题
startstartsvip
2007-03-24 05:13:01
问题很简单:
我程序里面有三个过程 过程A 过程B 过程C
过程A 会 用 dim newthread as new threading.thread (addressof 过程B)
newthread.start
开创一个新的基于过程B 线程
我的问题是如何在另外的独立过程里 例如过程C 里面,找到并终止 过程A 建立的线程
1)我知道 定义全局的线程
2)我查看了 msdn 的资料 也有用backgroundworker 的
还有没有 "其他的方法" ?
...全文
319
3
打赏
收藏
关于 多线程 abort 问题
问题很简单: 我程序里面有三个过程 过程A 过程B 过程C 过程A 会 用 dim newthread as new threading.thread (addressof 过程B) newthread.start 开创一个新的基于过程B 线程 我的问题是如何在另外的独立过程里 例如过程C 里面,找到并终止 过程A 建立的线程 1)我知道 定义全局的线程 2)我查看了 msdn 的资料 也有用backgroundworker 的 还有没有 "其他的方法" ?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
startstartsvip
2007-03-29
打赏
举报
回复
问题结帖, 说我什么么 恢复的次数大于给分的次数, 不知何结?
leixueqiyi
2007-03-26
打赏
举报
回复
你试试异步线程
startstartsvip
2007-03-24
打赏
举报
回复
下面是修订版:
问题很简单:
我程序里面有三个过程: 过程A 过程B 过程C.
过程A 会用
dim newthread as new threading.thread (addressof 过程B)
newthread.start
开创一个基于过程B 的线程
我的问题是如何在另外的独立过程里 例如过程C 里面,找到并终止 过程A 建立的线程
1)我知道 定义全局的线程可以解决
2)我也查看了 msdn 的资料 也有用backgroundworker 的,感觉不太好
还有没有 "其他的方法" & 怎么用 ?
C++ thread退出线程
多线程
子线程控制退出主线程 window VS2017 Debug Error!
Abort
() has been called
C++ thread退出线程
多线程
子线程控制退出主线程 window VS2017 Debug Error!
Abort
() has been called. C++ thread退出线程
多线程
子线程控制退出主线程 window VS2017 Debug Error!
Abort
() has been called.
C#
多线程
编程实战Code源代码
C#
多线程
编程实战Code源代码 资源是从华章出版社官网下载的
Posix
多线程
程序设计源码
Posix
多线程
程序设计书中实例源码。 头文件errors.h #ifndef __errors_h #define __errors_h #include #include #include #include #include /* * Define a macro that can be used for diagnostic output from * examples. When compiled -DDEBUG, it results in calling printf * with the specified argument list. When DEBUG is not defined, it * expands to nothing. */ #ifdef DEBUG # define DPRINTF(arg) printf arg #else # define DPRINTF(arg) #endif /* * NOTE: the "do {" ... "} while (0);" bracketing around the macros * allows the err_
abort
and errno_
abort
macros to be used as if they * were function calls, even in contexts where a trailing ";" would * generate a null statement. For example, * * if (status != 0) * err_
abort
(status, "message"); * else * return status; * * will not compile if err_
abort
is a macro ending with "}", because * C does not expect a ";" to follow the "}". Because C does expect * a ";" following the ")" in the do...while construct, err_
abort
and * errno_
abort
can be used as if they were function calls. */ #define err_
abort
(code,text) do { \ fprintf (stderr, "%s at \"%s\":%d: %s\n", \ text, __FILE__, __LINE__, strerror (code)); \
abort
(); \ } while (0) #define errno_
abort
(text) do { \ fprintf (stderr, "%s at \"%s\":%d: %s\n", \ text, __FILE__, __LINE__, strerror (errno)); \
abort
(); \ } while (0) #endif
由 TypeInitializationException 引起的
问题
由 TypeInitializationException 引起的
问题
VB6稳定
多线程
源代码
VB6下稳定的
多线程
封装模块,可使类对象中的方法为线程 Option Explicit Private jobindex As Long Private
abort
As Boolean Private Sub Command1_Click()
abort
= False jobindex = Threading.Start(Me, "dojob") End Sub Private Sub Command2_Click()
abort
= True End Sub Private Sub Command3_Click() MsgBox Threading.State(jobindex) End Sub Public Sub dojob() Dim n As Long Do If
abort
Then Exit Do n = n + 1 Text1.Text = n Threading.Wait 100,
abort
Loop End Sub
分析与设计
13,189
社区成员
5,759
社区内容
发帖
与我相关
我的任务
分析与设计
.NET技术 分析与设计
复制链接
扫一扫
分享
社区描述
.NET技术 分析与设计
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章