how to design muti thread program in VC++
-
i want to make one project of Multi-Threading involve.so first i want to design my program. i dont know how to design source code.plz tell me how to design
-
i want to make one project of Multi-Threading involve.so first i want to design my program. i dont know how to design source code.plz tell me how to design
There is no special pattern to design the source code of threading stuff. But it strictly depends on the type of threads you want to implement. A UI thread is represented by a C++ class derived from CWinThread. A worker thread is reperesented by a controlling function like this: UINT MyThreadProc(PVOID pParam); I usually create two files Thread.h and Thread.cpp and put the worker threads there; in Thread.h I put declarations and in Thread.cpp definations of controlling functions. Though this standard is not strictly necessary. You also may use worker threads in a class. In this case the controlling function must be a static member-function of that class. ... Try to specify your Q. -- ====== Arman
-
i want to make one project of Multi-Threading involve.so first i want to design my program. i dont know how to design source code.plz tell me how to design
Parallel and Distributed Programming Using C++, Cameron Hughes, Tracey Hughes[^] The title fits the description of what you're looking for ;), I didn't read it yet, but I intent to :) There are more book on the subject, just look through online book stores