d*r 发帖数: 238 | 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? |
n*********g 发帖数: 75 | 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?
|
d*r 发帖数: 238 | 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#.
|
x*******z 发帖数: 27 | 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?
|
d*r 发帖数: 238 | 5
i have figured it out.
thank you.
【在 x*******z 的大作中提到】 : 没有系统thread的封装,只有到System.Diagnostics.Process一级
|
x*******z 发帖数: 27 | 6 Could you show us how you wrap for system threads?
【在 d*r 的大作中提到】 : : i have figured it out. : thank you.
|
d*r 发帖数: 238 | 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?
|
x*******z 发帖数: 27 | 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.
|