summaryrefslogtreecommitdiff
path: root/src/thread.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-06-08 15:27:57 +0000
committerrubidium <rubidium@openttd.org>2008-06-08 15:27:57 +0000
commite43d0507301689d6178d310c98b1403588eb474f (patch)
tree376004aeb09d74a071fcdddcc61f01e9ea005d8b /src/thread.h
parenteac3301b63070ad0c0f1ce1323f25326ce90226d (diff)
downloadopenttd-e43d0507301689d6178d310c98b1403588eb474f.tar.xz
(svn r13417) -Fix (r12945, r13413): freeing the ThreadObjects in a manner that hopefully doesn't cause crashes.
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/thread.h b/src/thread.h
index deaea0cd9..f6f29a711 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -6,7 +6,6 @@
#define THREAD_H
typedef void (*OTTDThreadFunc)(void *);
-typedef void (*OTTDThreadTerminateFunc)(class ThreadObject *self);
/**
* A Thread Object which works on all our supported OSes.
@@ -57,10 +56,9 @@ public:
* with optinal params.
* @param proc The procedure to call inside the thread.
* @param param The params to give with 'proc'.
- * @param terminate_func The function (or NULL) to call when the thread terminates.
* @return True if the thread was started correctly.
*/
- static ThreadObject *New(OTTDThreadFunc proc, void *param, OTTDThreadTerminateFunc terminate_func);
+ static ThreadObject *New(OTTDThreadFunc proc, void *param);
/**
* Convert the current thread to a new ThreadObject.
@@ -73,12 +71,6 @@ public:
* @return The thread ID of the current active thread.
*/
static uint CurrentId();
-
- /**
- * A OTTDThreadTerminateFunc, which cleans up the thread itself
- * at termination of the thread (so it becomes self-managed).
- */
- static void TerminateCleanup(ThreadObject *self) { delete self; }
};
/**