aboutsummaryrefslogtreecommitdiff
path: root/src/stable/thread.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2020-02-18 08:41:41 -0800
committerMike Buland <eichlan@xagasoft.com>2020-02-18 08:41:41 -0800
commitead9b8be325bdadb6b2a4e2a3b22dd34d7df8e4d (patch)
treeb699bbc7ca3ab9ca3155be7778e171fe9d29fb07 /src/stable/thread.h
parent0690dbdf8e57cd148d8b7f7ba56f23d673f7eb22 (diff)
downloadlibbu++-ead9b8be325bdadb6b2a4e2a3b22dd34d7df8e4d.tar.gz
libbu++-ead9b8be325bdadb6b2a4e2a3b22dd34d7df8e4d.tar.bz2
libbu++-ead9b8be325bdadb6b2a4e2a3b22dd34d7df8e4d.tar.xz
libbu++-ead9b8be325bdadb6b2a4e2a3b22dd34d7df8e4d.zip
Renamed Bu::Thread::stop to Bu::Thread::forceStop.
This wound up biting me, stop wasn't implemented in one child class and it was force-stopping it. Stop isn't usually implemented like this in threadding classes, and this should be no exception. I'm still exposing the posix threads stop functionality, but it really shouldn't even be used. This may break some things, but if it does, they probably weren't working correctly anyway. Sorry.
Diffstat (limited to 'src/stable/thread.h')
-rw-r--r--src/stable/thread.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stable/thread.h b/src/stable/thread.h
index 294c250..5174d1c 100644
--- a/src/stable/thread.h
+++ b/src/stable/thread.h
@@ -79,11 +79,16 @@ namespace Bu
79 * probably create a memory leak type of situation. Instead of stop, 79 * probably create a memory leak type of situation. Instead of stop,
80 * consider using cancel, which can be handled by the running thread in 80 * consider using cancel, which can be handled by the running thread in
81 * a graceful manner. 81 * a graceful manner.
82 *
83 * NOTE: This was called stop(), but that was too ambiguous and common
84 * of a name to implement in subclasses. The functionality was not
85 * obvious, and this was sometimes used in place of a clean stopping
86 * routine.
82 *@returns True if the thread was stopped, false otherwise. When this 87 *@returns True if the thread was stopped, false otherwise. When this
83 * function returns the thread may not have stopped, to ensure that the 88 * function returns the thread may not have stopped, to ensure that the
84 * thread has really stopped, call join. 89 * thread has really stopped, call join.
85 */ 90 */
86 bool stop(); 91 bool forceStop();
87 92
88 /** 93 /**
89 * Join the thread in action. This function performs what is commonly 94 * Join the thread in action. This function performs what is commonly