projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implemented IsModified() and DiscardEdits()
[wxWidgets.git]
/
src
/
mac
/
carbon
/
thread.cpp
diff --git
a/src/mac/carbon/thread.cpp
b/src/mac/carbon/thread.cpp
index 23a72037529fc718ccf96605f5a9d16ecc321457..8c64c8818ae3f9b2aa2b261aea86bdfd96da4562 100644
(file)
--- a/
src/mac/carbon/thread.cpp
+++ b/
src/mac/carbon/thread.cpp
@@
-433,6
+433,8
@@
bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
SetPriority(m_priority);
}
SetPriority(m_priority);
}
+ m_state = STATE_NEW;
+
return TRUE;
}
return TRUE;
}
@@
-527,7
+529,7
@@
void wxThread::Sleep(unsigned long milliseconds)
do
{
YieldToAnyThread();
do
{
YieldToAnyThread();
- } while( clock() - start <
(milliseconds * CLOCKS_PER_SEC) / 1000
) ;
+ } while( clock() - start <
milliseconds / 1000.0 * CLOCKS_PER_SEC
) ;
}
int wxThread::GetCPUCount()
}
int wxThread::GetCPUCount()
@@
-714,13
+716,6
@@
wxThreadError wxThread::Delete(ExitCode *pRc)
}
}
}
}
- // if ( !::GetExitCodeThread(hThread, (LPDWORD)&rc) )
- {
- wxLogLastError("GetExitCodeThread");
-
- rc = (ExitCode)-1;
- }
-
if ( IsDetached() )
{
// if the thread exits normally, this is done in WinThreadStart, but in
if ( IsDetached() )
{
// if the thread exits normally, this is done in WinThreadStart, but in
@@
-730,9
+725,6
@@
wxThreadError wxThread::Delete(ExitCode *pRc)
delete this;
}
delete this;
}
- // wxASSERT_MSG( (DWORD)rc != STILL_ACTIVE,
- // wxT("thread must be already terminated.") );
-
if ( pRc )
*pRc = rc;
if ( pRc )
*pRc = rc;
@@
-852,7
+844,7
@@
bool wxThreadModule::OnInit()
#endif
if ( !hasThreadManager )
{
#endif
if ( !hasThreadManager )
{
- wxMessageBox(
"Error" , "Thread Support is not available on this System"
, wxOK ) ;
+ wxMessageBox(
wxT("Error") , wxT("Thread Support is not available on this System")
, wxOK ) ;
return FALSE ;
}
return FALSE ;
}