summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/progress.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libdimension/progress.c b/libdimension/progress.c
index bfeeff7..18c462f 100644
--- a/libdimension/progress.c
+++ b/libdimension/progress.c
@@ -136,9 +136,6 @@ int dmnsn_finish_progress(dmnsn_progress *progress)
int retval = 1;
if (progress) {
- /* Wake up all waiters */
- dmnsn_done_progress(progress);
-
if (pthread_join(progress->thread, &ptr) != 0) {
/* Medium severity because an unjoined thread likely means that the thread
is incomplete or invalid */
@@ -146,6 +143,8 @@ int dmnsn_finish_progress(dmnsn_progress *progress)
} else if (ptr) {
retval = *(int *)ptr;
free(ptr);
+ /* Wake up all waiters */
+ dmnsn_done_progress(progress);
}
dmnsn_delete_progress(progress);
}