Skip to content

Commit

Permalink
Merge pull request pmodels#366 from shintaro-iwasaki/pr/fix_pop_timed…
Browse files Browse the repository at this point in the history
…wait

pool: fix ABTI_pool_pop_timedwait
  • Loading branch information
shintaro-iwasaki authored Aug 23, 2021
2 parents d1cd706 + e630885 commit 4dc37e1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/pool/pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,11 +1444,15 @@ ABT_thread ABTI_pool_pop_timedwait(ABTI_pool *p_pool, double abstime_secs)
ABT_unit unit =
p_pool->deprecated_def.p_pop_timedwait(ABTI_pool_get_handle(p_pool),
abstime_secs);
ABTI_thread *p_thread =
ABTI_unit_get_thread(ABTI_global_get_global(), unit);
ABT_thread thread = ABTI_thread_get_handle(p_thread);
LOG_DEBUG_POOL_POP(p_pool, thread);
return thread;
if (unit == ABT_UNIT_NULL) {
return ABT_THREAD_NULL;
} else {
ABTI_thread *p_thread =
ABTI_unit_get_thread(ABTI_global_get_global(), unit);
ABT_thread thread = ABTI_thread_get_handle(p_thread);
LOG_DEBUG_POOL_POP(p_pool, thread);
return thread;
}
}

void ABTI_pool_print(ABTI_pool *p_pool, FILE *p_os, int indent)
Expand Down

0 comments on commit 4dc37e1

Please sign in to comment.