Newbie question on creating worker threads 
Author Message
 Newbie question on creating worker threads

Mike's suggestion is on track.  Create your thread from within one of
the window classes (CMainframe) and pass the HWND of the window to
the worker thread.  It can then use PostMessage to tell the window (and
hence the main thread) that's its done.

All I want to say to you is
                                De do do do de do do do

Fri, 18 Jun 1999 03:00:00 GMT  
 Newbie question on creating worker threads


When the worker thread is finished, it has to be able to notify one of your
windows of this fact.  I start the worker thread from the OnCreate() method
of the window that will be notified when its done.  This way I can
immediately give the HWND of the window to the new worker thread.

>I'm wondering in part because when the thread is
>done, it will return to its caller.

Actually when the thread is done it will just disappear, it won't return
anywhere.  It's up to the worker thread to post a WM_USER message (or
equivilent) to your GUI pieces before it dies.

Hope this helps.


Fri, 18 Jun 1999 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. how do i create thread safe worker thread

2. Exe server threading model - events from worker thread question

3. Newbie: Worker Thread problems

4. Marshalling Objects created in worker threads?

5. Creating worker thread in DLL Startup

6. CSocket: Creates() makes a worker thread - normal ?

7. creating a worker thread

8. worker threads with create()

9. Create Dialog in worker thread

10. Creating Worker Threads inside a Class Object?

11. creating worker threads

12. Problem creating a worker thread


Powered by phpBB® Forum Software