summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/threads.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdimension/threads.c b/libdimension/threads.c
index 54939e6..04874de 100644
--- a/libdimension/threads.c
+++ b/libdimension/threads.c
@@ -93,6 +93,8 @@ int
dmnsn_execute_concurrently(dmnsn_ccthread_fn *ccthread_fn,
void *arg, unsigned int nthreads)
{
+ dmnsn_assert(nthreads > 0, "Attempt to execute using 0 concurrent threads.");
+
pthread_t threads[nthreads];
dmnsn_ccthread_payload payloads[nthreads];