Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
__fastcall TMyThread::TMyThread(bool CreateSuspended)
//tpIdle The thread executes only when the system is idle. Windows won't
//interrupt other threads to execute a thread with tpIdle priority.
//tpLowest The thread's priority is two points below normal.
//tpLower The thread's priority is one point below normal.
//tpNormal The thread has normal priority.
//tpHigher The thread's priority is one point above normal.
//tpHighest The thread's priority is two points above normal.
//tpTimeCritical The thread gets highest priority.
Priority = tpHighest;
If you want to "bypass" compiler/IDE specific overload, you can build your class on top of CreateThread win32API. But, beware of threading bug, use mutexes and other "safeguards". I've been bitten by threading bug a few months ago (in MSVC++6), and its debugger can not find the bug. Only after watching the Windows Task Manager I can see that something went wrong with the CPU usage, from there I know that, it must be a threading bug. After fixing the corresponding module synchronization routine, everything went good. Just a caution though
refer msdn for writing multithreaded application, you would probably have array of object of class CWinThread if you are using MFC or you need to manage thread handles in an array, i assume you want to encapsulate creation of threads and manage it.