Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-15 15:15:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-15 15:30:31 +0300
commit4226ee0b71fec6f08897dacf3d6632526618acca (patch)
tree560c333c5a9458f3dbbb606befd52d558b35503f /source/blender/blenlib/intern/task.c
parent30c3852ffd140b003410aae25b222dea8b76412f (diff)
Cleanup: comment line length (blenlib)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/blenlib/intern/task.c')
-rw-r--r--source/blender/blenlib/intern/task.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c
index 4c6f27ab359..76d46e3a231 100644
--- a/source/blender/blenlib/intern/task.c
+++ b/source/blender/blenlib/intern/task.c
@@ -364,12 +364,13 @@ static bool task_scheduler_thread_wait_pop(TaskScheduler *scheduler, Task **task
do {
Task *current_task;
- /* Assuming we can only have a void queue in 'exit' case here seems logical (we should only be here after
- * our worker thread has been woken up from a condition_wait(), which only happens after a new task was
- * added to the queue), but it is wrong.
- * Waiting on condition may wake up the thread even if condition is not signaled (spurious wake-ups), and some
- * race condition may also empty the queue **after** condition has been signaled, but **before** awoken thread
- * reaches this point...
+ /* Assuming we can only have a void queue in 'exit' case here seems logical
+ * (we should only be here after our worker thread has been woken up from a
+ * condition_wait(), which only happens after a new task was added to the queue),
+ * but it is wrong.
+ * Waiting on condition may wake up the thread even if condition is not signaled
+ * (spurious wake-ups), and some race condition may also empty the queue **after**
+ * condition has been signaled, but **before** awoken thread reaches this point...
* See http://stackoverflow.com/questions/8594591
*
* So we only abort here if do_exit is set.
@@ -635,7 +636,8 @@ static TaskPool *task_pool_create_ex(TaskScheduler *scheduler,
TaskPool *pool = MEM_mallocN(sizeof(TaskPool), "TaskPool");
#ifndef NDEBUG
- /* Assert we do not try to create a background pool from some parent task - those only work OK from main thread. */
+ /* Assert we do not try to create a background pool from some parent task -
+ * those only work OK from main thread. */
if (is_background) {
const pthread_t thread_id = pthread_self();
int i = scheduler->num_threads;