diff options
author | tron <tron@openttd.org> | 2005-08-05 09:15:41 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-08-05 09:15:41 +0000 |
commit | f315c95fa1221441106f1e6e4f4a0f7849ccb4b4 (patch) | |
tree | 4db884818a15ec2dc30fe1f1e660bded27872dae /win32.c | |
parent | 69f79c9f4988c5fdb7308566e3bf56e0fe8b0594 (diff) | |
download | openttd-f315c95fa1221441106f1e6e4f4a0f7849ccb4b4.tar.xz |
(svn r2809) Implement more generic threading functions, which allow more than one thread
Diffstat (limited to 'win32.c')
-rw-r--r-- | win32.c | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -1193,25 +1193,6 @@ bool InsertTextBufferClipboard(Textbuf *tb) return false; } -static HANDLE hThread; - -bool CreateOTTDThread(void *func, void *param) -{ - DWORD dwThreadId; - hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, param, 0, &dwThreadId); - SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL); - - return hThread != NULL; -} - -void JoinOTTDThread(void) -{ - if (hThread == NULL) return; - - WaitForSingleObject(hThread, INFINITE); - if (!CloseHandle(hThread)) DEBUG(misc, 0) ("Failed to close thread handle!"); -} - void CSleep(int milliseconds) { |