// platforms that support that - call Run() to start it
// (special cased for watcom which won't accept 0 default)
-#ifdef __WATCOMC__
- wxThreadError Create(unsigned int stackSize = 10240);
-#else
wxThreadError Create(unsigned int stackSize = 0);
-#endif
// starts execution of the thread - from the moment Run() is called
// the execution of wxThread::Entry() may start at any moment, caller
// creation instead of Win32 API one because otherwise we will have memory
// leaks if the thread uses C RTL (and most threads do)
#ifdef wxUSE_BEGIN_THREAD
+
+ // Watcom is reported to not like 0 stack size (which means "use default"
+ // for the other compilers and is also the default value for stackSize)
+#ifdef __WATCOMC__
+ if ( !stackSize )
+ stackSize = 10240;
+#endif // __WATCOMC__
+
m_hThread = (HANDLE)_beginthreadex
(
NULL, // default security
m_hThread = ::CreateThread
(
NULL, // default security
- stackSize, // default stack size
+ stackSize, // stack size
wxThreadInternal::WinThreadStart, // thread entry point
(LPVOID)thread, // parameter
CREATE_SUSPENDED, // flags