Prevent cancellation of threads but log that we would have cancelled it.
authorDave West <davew@uncensored.citadel.org>
Thu, 20 Mar 2008 13:26:47 +0000 (13:26 +0000)
committerDave West <davew@uncensored.citadel.org>
Thu, 20 Mar 2008 13:26:47 +0000 (13:26 +0000)
Its causing problems on Uncensored.

citadel/threads.c

index cd1e999d08f738ea3c6c19370e68ac09320f0511..fdbf5dced068a5fa3be3daeaf5a367709e078dd4 100644 (file)
@@ -644,13 +644,13 @@ void CtdlThreadGC (void)
                
                if (that_thread->stop_ticker == 5)
                {
-                       CtdlLogPrintf(CTDL_DEBUG, "Thread System: The thread \"%s\" (0x%08lx) failed to self terminate withing 5 ticks. Canceling it.\n", that_thread->name, that_thread->tid);
+                       CtdlLogPrintf(CTDL_DEBUG, "Thread System: The thread \"%s\" (0x%08lx) failed to self terminate withing 5 ticks. It would be cancelled now.\n", that_thread->name, that_thread->tid);
                        if ((that_thread->flags & CTDLTHREAD_WORKER) == 0)
-                               CtdlLogPrintf(CTDL_INFO, "Thread System: A non worker thread was canceled this may cause message loss.\n");
-                       that_thread->state = CTDL_THREAD_CANCELLED;
+                               CtdlLogPrintf(CTDL_INFO, "Thread System: A non worker thread would have been canceled this may cause message loss.\n");
+//                     that_thread->state = CTDL_THREAD_CANCELLED;
                        that_thread->stop_ticker++;
-                       citthread_cancel(that_thread->tid);
-                       continue;
+//                     citthread_cancel(that_thread->tid);
+//                     continue;
                }
                
                /* Do we need to clean up this thread? */