diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-04-26 15:08:33 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-04-26 18:06:18 -0400 |
commit | bc1ac83133bb32ce3795c4781fd504580ae27d8b (patch) | |
tree | 95dd45607ab10d25ca8f3dbadccc76f3a02d1b0d | |
parent | 12c4a5eb07f346083a59bc7d18567b2df3ed94ee (diff) | |
download | dimension-bc1ac83133bb32ce3795c4781fd504580ae27d8b.tar.xz |
future.c: Don't let people join futures while they're paused.
-rw-r--r-- | libdimension/future.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libdimension/future.c b/libdimension/future.c index 622d40e..c344a8e 100644 --- a/libdimension/future.c +++ b/libdimension/future.c @@ -63,6 +63,8 @@ dmnsn_future_join(dmnsn_future *future) int retval = -1; if (future) { + dmnsn_assert(future->npaused == 0, "Attempt to join future while paused"); + /* Get the thread's return value */ dmnsn_join_thread(future->thread, &ptr); if (ptr && ptr != PTHREAD_CANCELED) { |