File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -1407,19 +1407,25 @@ end
14071407 function construct ()
14081408 Rational {I} (c)
14091409 end
1410- prec = precision (BigFloat)
1411- worker_count = 10 * Threads. nthreads ()
1412- task = ConcurrencyUtilities. run_concurrently_in_new_task (construct, worker_count)
1413- schedule (task)
1414- ok = true
1415- while ! istaskdone (task)
1416- for _ ∈ 1 : 1000000
1417- ok &= precision (BigFloat) === prec
1410+ function is_racy_rational_from_irrational ()
1411+ worker_count = 10 * Threads. nthreads ()
1412+ task = ConcurrencyUtilities. run_concurrently_in_new_task (construct, worker_count)
1413+ schedule (task)
1414+ ok = true
1415+ while ! istaskdone (task)
1416+ for _ ∈ 1 : 1000000
1417+ ok &= precision (BigFloat) === prec
1418+ end
1419+ GC. safepoint ()
1420+ yield ()
14181421 end
1419- GC . safepoint ( )
1420- yield ()
1422+ fetch (task )
1423+ ok
14211424 end
1422- fetch (task)
1425+ prec = precision (BigFloat)
1426+ task = ConcurrencyUtilities. new_task_nonsticky (is_racy_rational_from_irrational)
1427+ schedule (task)
1428+ ok = fetch (task)
14231429 setprecision (BigFloat, prec)
14241430 ok
14251431 end
You can’t perform that action at this time.
0 commit comments