Subj : Re: regarding threads in VC++, for a beginnner To : comp.os.ms-windows.programmer.win32,comp.programming.threads From : Ian T Date : Sat Jan 22 2005 07:01 pm Scott McPhillips [MVP] wrote: > r_obert@REMOVE_THIS.hotmail.com wrote: > > > The recommended way to start such a "worker" thread is to call > _beginthreadex. One of its parameters is a function pointer to your > thread function. Another parameter (void*) permits you to pass data to > the thread function. Then your thread function runs concurrently. > I have been taught (by someone else) to pass an object reference in lparam (as a void *), then convert it back to the object and call a member function. So my questions are these. 1. Is this bad practice? Should I push my objects onto a queue and process them in the thread funtion (dealing with contention for the queue with a mutex or semaphore)? 2. Does the member function that I call in the thread function execute in the thread's "space"? Or does it execute in in the main thread's "space"? Thanks, Ian .