+ int res = 0;
+
+ if (p_internal->state == STATE_RUNNING)
+ {
+ res = pthread_cancel(p_internal->thread_id);
+ if (res == 0)
+ p_internal->state = STATE_CANCELED;
+ }
+
+ return wxTHREAD_NO_ERROR;
+}
+
+wxThreadError wxThread::Pause()
+{
+ if (p_internal->state != STATE_RUNNING)
+ return wxTHREAD_NOT_RUNNING;
+
+ if (!p_internal->defer_destroy)
+ return wxTHREAD_MISC_ERROR;
+
+ p_internal->state = STATE_PAUSING;
+ return wxTHREAD_NO_ERROR;
+}
+
+wxThreadError wxThread::Resume()
+{
+ if (p_internal->state == STATE_PAUSING || p_internal->state == STATE_PAUSED)
+ p_internal->state = STATE_RUNNING;