[Openthreads-info] Validitity checks for CurrentThread()->testCancel() and time sliced testCancel()
Brought to you by:
sspicer
From: Robert O. <ro...@op...> - 2003-08-22 17:58:26
|
Hi All, I have just integrated a few more changes to the OpenThreads Win32 implemenation. The changed files are attached to get round the cvs read delay. The key changes are : A check against each call to testCancel() has been added to all the relevant code. So now you'll see Thread* thread = CurrentThread(); if (thread) thread->testCancel(); The previous CurrentThread()->testCancel() was causing crashes since the main thread does not have an associated OpenThreads Thread structure so CurrentThread returns null. Also I've added the time slicing to the wait implemenation, that I suggested earlier today. Again this code is untested under Win32 so please get back to with compile/execute fixes. Thanks in advance for your feedback, Robert. |