From b5b2d09d43dd5de43500e7b21b6f2fb9e0d323b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Kapri=C5=A1?= Date: Fri, 24 Oct 2025 10:20:20 +0200 Subject: [PATCH] Replace mentions of "writer" threads with "worker" threads --- mandelbrot-visualizer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mandelbrot-visualizer.c b/mandelbrot-visualizer.c index 18a854a..4ed979f 100644 --- a/mandelbrot-visualizer.c +++ b/mandelbrot-visualizer.c @@ -31,7 +31,7 @@ struct threadInfo { /* * Concurrency model explained: * One main thread, along with many workers in a thread pool, who split the work of - * rendering roughly equally. The writers don't do any work until the pixel map which they + * rendering roughly equally. The workers don't do any work until the pixel map which they * are meant to work on is marked as available, and they are all singalled to start * drawing. * @@ -84,7 +84,7 @@ void color_lookup(int *r, int *g, int *b, double mu); // worker code gboolean queue_redraw_plane(void *arg); -void *writer_thread(void *arg) +void *worker_thread(void *arg) { struct threadInfo *info = arg; while (true) { @@ -121,7 +121,7 @@ void draw_mandelbrot(struct threadInfo *info) pthread_mutex_unlock(&pixmapMutex); return; // after this, the thread will again enter the - // loop in the writer_thread function, and + // loop in the worker_thread function, and // enter a wait state } pthread_mutex_unlock(&pixmapMutex); @@ -259,7 +259,7 @@ int main(int argc, char **argv) // integer, if the thread fails to start, it will simply be // overwritten by the same value in the next run of the loop pthread_t id; - if (pthread_create(&id, NULL, &writer_thread, &threads[count])) { + if (pthread_create(&id, NULL, &worker_thread, &threads[count])) { pthread_detach(id); fprintf(stderr, "Failed to create thread %d\n", i); continue;