From cb3dbf22c21ef2d4ad43f718dd9360b7f4008cc8 Mon Sep 17 00:00:00 2001 From: glenda Date: Tue, 13 Sep 2022 15:37:47 +0000 Subject: Call it threads, not tasks --- concurrency.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'concurrency.c') diff --git a/concurrency.c b/concurrency.c index f35f329..28cea35 100644 --- a/concurrency.c +++ b/concurrency.c @@ -244,19 +244,19 @@ newthreaddata(Array *name) } Array * -runningtasks(void) +runningthreads(void) { lock(&threadlock); - Array *tasks = allocarray(AtypeInt, 1, nthreads); - tasks->shape[0] = nthreads; + Array *t = allocarray(AtypeInt, 1, nthreads); + t->shape[0] = nthreads; for(int i = 0; i < nthreads; i++) - tasks->intdata[i] = threads[i]->id; + t->intdata[i] = threads[i]->id; unlock(&threadlock); - return tasks; + return t; } Array * -taskproperty(vlong t, vlong p) +threadproperty(vlong t, vlong p) { ThreadData *td = nil; Array *res = nil; @@ -290,7 +290,7 @@ taskproperty(vlong t, vlong p) break; default: unlock(&threadlock); - throwerror(L"Invalid task property", EDomain); + throwerror(L"Invalid thread property", EDomain); break; } -- cgit v1.2.3