MCPcopy Create free account
hub / github.com/NthTensor/Forte / random_tree_inner

Function random_tree_inner

src/scope.rs:1377–1393  ·  view source on GitHub ↗
(
        depth: usize,
        rng: &mut XorShift64Star,
    )

Source from the content-addressed store, hash-verified

1375 });
1376 assert_eq!(value, 42);
1377
1378 THREAD_POOL.depopulate();
1379 }
1380
1381 /// This is a handy future that needs to be polled repeatedly before
1382 /// resolving.
1383 ///
1384 /// Each time it is polled, it wakes itself (so it will be polled again) and
1385 /// yields. It does this until it has been polled 128 times.
1386 ///
1387 /// This lets us test the behavior of scopes for sleeping tasks, to ensure
1388 /// we do not return from the scope while tasks are still pending.
1389 #[derive(Default)]
1390 struct CountFuture {
1391 /// The number of times the future has been polled.
1392 count: usize,
1393 }
1394
1395 impl Future for CountFuture {
1396 type Output = ();

Callers 1

random_treeFunction · 0.85

Calls 1

next_usizeMethod · 0.80

Tested by

no test coverage detected