File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1444,11 +1444,15 @@ ABT_thread ABTI_pool_pop_timedwait(ABTI_pool *p_pool, double abstime_secs)
1444
1444
ABT_unit unit =
1445
1445
p_pool -> deprecated_def .p_pop_timedwait (ABTI_pool_get_handle (p_pool ),
1446
1446
abstime_secs );
1447
- ABTI_thread * p_thread =
1448
- ABTI_unit_get_thread (ABTI_global_get_global (), unit );
1449
- ABT_thread thread = ABTI_thread_get_handle (p_thread );
1450
- LOG_DEBUG_POOL_POP (p_pool , thread );
1451
- return thread ;
1447
+ if (unit == ABT_UNIT_NULL ) {
1448
+ return ABT_THREAD_NULL ;
1449
+ } else {
1450
+ ABTI_thread * p_thread =
1451
+ ABTI_unit_get_thread (ABTI_global_get_global (), unit );
1452
+ ABT_thread thread = ABTI_thread_get_handle (p_thread );
1453
+ LOG_DEBUG_POOL_POP (p_pool , thread );
1454
+ return thread ;
1455
+ }
1452
1456
}
1453
1457
1454
1458
void ABTI_pool_print (ABTI_pool * p_pool , FILE * p_os , int indent )
You can’t perform that action at this time.
0 commit comments