projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oh well, I'll just stuff in the rest of the Unicode changes I have made
[wxWidgets.git]
/
src
/
unix
/
threadpsx.cpp
diff --git
a/src/unix/threadpsx.cpp
b/src/unix/threadpsx.cpp
index 50e99df2a72fd6a3a55415a4d3d606ac916fd674..475d0b72b82bfab52a5bda92f3f5c45f534b2d0c 100644
(file)
--- a/
src/unix/threadpsx.cpp
+++ b/
src/unix/threadpsx.cpp
@@
-453,7
+453,9
@@
wxThread::wxThread()
wxThreadError wxThread::Create()
{
wxThreadError wxThread::Create()
{
- if (p_internal->GetState() != STATE_NEW)
+ // Maybe we could think about recreate the thread once it has exited.
+ if (p_internal->GetState() != STATE_NEW &&
+ p_internal->GetState() != STATE_EXITED)
return wxTHREAD_RUNNING;
// set up the thread attribute: right now, we only set thread priority
return wxTHREAD_RUNNING;
// set up the thread attribute: right now, we only set thread priority
@@
-668,7
+670,8
@@
void wxThread::Exit(void *status)
p_internal->SetState(STATE_EXITED);
// delete both C++ thread object and terminate the OS thread object
p_internal->SetState(STATE_EXITED);
// delete both C++ thread object and terminate the OS thread object
- delete this;
+ // GL: This is very ugly and buggy ...
+// delete this;
pthread_exit(status);
}
pthread_exit(status);
}