avatar
Is there WinThread in C## DotNet - 窗口里的风景
d*r
1
Like the WinThread in VC++ which is a thread with a message queue so tha
t other threads could throw a message into the winthread to fire an even
t in the winthread.
I read through the MSDN and feel that the I have to implement such threa
d by myself.
Any comments?
avatar
n*g
2
don't know what is winthread in VC++.
you may check out events and delegates in C#.

【在 d*r 的大作中提到】
: Like the WinThread in VC++ which is a thread with a message queue so tha
: t other threads could throw a message into the winthread to fire an even
: t in the winthread.
: I read through the MSDN and feel that the I have to implement such threa
: d by myself.
: Any comments?

avatar
d*r
3
I have tried that. Say if object1 in thread1 and objct2 in thread2, obje
ct1 fire an event and objct2 catch the event, the first problem is that
the event is catched in thread1 instead of thread2. The second problem i
s that the thread1 is then blocked until the event catching is finished.


【在 n*********g 的大作中提到】
: don't know what is winthread in VC++.
: you may check out events and delegates in C#.

avatar
x*z
4
没有系统thread的封装,只有到System.Diagnostics.Process一级

【在 d*r 的大作中提到】
: Like the WinThread in VC++ which is a thread with a message queue so tha
: t other threads could throw a message into the winthread to fire an even
: t in the winthread.
: I read through the MSDN and feel that the I have to implement such threa
: d by myself.
: Any comments?

avatar
d*r
5

i have figured it out.
thank you.

【在 x*******z 的大作中提到】
: 没有系统thread的封装,只有到System.Diagnostics.Process一级
avatar
x*z
6
Could you show us how you wrap for system threads?

【在 d*r 的大作中提到】
:
: i have figured it out.
: thank you.

avatar
d*r
7
As I said in my first post, what I need is a thread with a build-in message
queue. And that's what I did. My first post was trying to find if there was
such class in System while I didn't know. And after some research, I think
the answer is either create such class or use the system message queue.

【在 x*******z 的大作中提到】
: Could you show us how you wrap for system threads?
avatar
x*z
8
I see, thanks

【在 d*r 的大作中提到】
: As I said in my first post, what I need is a thread with a build-in message
: queue. And that's what I did. My first post was trying to find if there was
: such class in System while I didn't know. And after some research, I think
: the answer is either create such class or use the system message queue.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。