Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NthTensor/Forte
/ functions
Functions
204 in github.com/NthTensor/Forte
⨍
Functions
204
◇
Types & classes
46
↓ 41 callers
Method
spawn
Runs a closure or future sometime before the scope completes. This is like [`Worker::spawn`], allows the work to borrow local data. Vald inputs to th
src/scope.rs:161
↓ 35 callers
Method
resize_to_available
Resizes the thread pool to fill (almost) all available cores. After this returns, the pool will have between 1 and 32 workers. Returns the new size of
src/thread_pool.rs:226
↓ 30 callers
Method
depopulate
Removes all worker threads from the thread pool. This should only be done carefully, as blocking on an empty pool can cause a deadlock. See [`ThreadP
src/thread_pool.rs:280
↓ 27 callers
Method
scope
(&'static self, f: F)
src/thread_pool.rs:724
↓ 18 callers
Method
with_worker
(&'static self, func: F)
src/thread_pool.rs:388
↓ 13 callers
Method
get
(&'static self)
src/lib.rs:267
↓ 13 callers
Method
join
(&'static self, a: A, b: B)
src/thread_pool.rs:710
↓ 12 callers
Method
append
Appends a chunk of jobs (expected to be provided by `split`) to the queue. Jobs are added to the end (the side with the newest jobs).
src/job.rs:205
↓ 12 callers
Method
signal
(&self)
src/latch.rs:216
↓ 11 callers
Function
halt_unwinding
(func: F)
src/unwind.rs:17
↓ 8 callers
Method
get_member_data
Returns member data, initializing it on the first call.
src/thread_pool.rs:779
↓ 7 callers
Method
iter
(&self)
src/scope.rs:1335
↓ 7 callers
Method
spawn
(self, scheduler: S, worker: Option<&Worker>)
src/thread_pool.rs:494
↓ 6 callers
Function
scope
Creates a new scope for spawning non-static work. When executed on a thread that is currently registered as a worker (i.e. the closure inside [`Membe
src/thread_pool.rs:2431
↓ 5 callers
Method
schedule
Schedules this job to be polled, by converting it into a `JobRef` and handing that to the job's own `scheduler`. The `worker` param should be the same
src/scope.rs:675
↓ 5 callers
Method
spawn_on
Like [`spawn`](Self::spawn), but routes the work to a specific pool member so it runs on that member's thread.
src/scope.rs:178
↓ 4 callers
Method
iter_bits
(self)
src/util.rs:59
↓ 4 callers
Method
new_latch
(&self)
src/thread_pool.rs:1349
↓ 4 callers
Method
next_usize
Return a value from `0..n`.
src/util.rs:49
↓ 4 callers
Method
push_new
Insert a job at the back of the queue (the side with the newest jobs).
src/job.rs:125
↓ 4 callers
Method
resize
(&'static self, get_size: F)
src/thread_pool.rs:287
↓ 4 callers
Method
set
(latch: *const Latch, error: bool)
src/latch.rs:141
↓ 4 callers
Method
sharing_queue
(&self)
src/thread_pool.rs:1050
↓ 4 callers
Method
store_panic
(&self, err: Box<dyn Any + Send + 'static>)
src/scope.rs:336
↓ 4 callers
Method
thread_pool
(&self)
src/thread_pool.rs:1232
↓ 4 callers
Method
unfreeze_membership
Unblocks workers from resigning from the pool. Each call to this function must be paired with exactly one preceding call to `unfreeze_membership`.
src/thread_pool.rs:914
↓ 4 callers
Method
wait_for
(&self, latch: &Latch)
src/thread_pool.rs:1358
↓ 3 callers
Method
execute
(&self, job_ref: JobRef, migrated: bool)
src/thread_pool.rs:1511
↓ 3 callers
Method
freeze_membership
Blocks workers from resigning from the pool. Each call to this function must be paired with exactly one following call to `unfreeze_membership`. Ret
src/thread_pool.rs:884
↓ 3 callers
Method
id
(&'static self)
src/thread_pool.rs:181
↓ 3 callers
Method
into_job_ref
(self: Box<Self>)
src/job.rs:511
↓ 3 callers
Method
into_job_ref
Converts an `Arc<ScopeFutureJob>` into a job ref that can be queued on a thread pool. The ref-count is not decremented, ensuring that the job remains
src/scope.rs:644
↓ 3 callers
Method
push_shared_job
(&'static self, job_ref: JobRef)
src/thread_pool.rs:200
↓ 3 callers
Method
remove_reference
Removes a reference from the scope's reference counter. # Safety The caller must be able to point to a corresponding place where the scope counter w
src/scope.rs:314
↓ 3 callers
Function
resume_unwinding
(payload: Box<dyn Any + Send>)
src/unwind.rs:25
↓ 3 callers
Method
schedule
(&self, job_ref: JobRef, worker: Option<&'w Worker>)
src/thread_pool.rs:426
↓ 3 callers
Method
spawn_scoped
( self, scope: &'scope Scope<'scope, 'env>, scheduler: S, )
src/scope.rs:477
↓ 3 callers
Method
wait
Waits for a signal on this member's semaphore.
src/thread_pool.rs:1069
↓ 2 callers
Method
activate
(self, f: F)
src/thread_pool.rs:953
↓ 2 callers
Method
as_job_ref
(&self)
src/job.rs:271
↓ 2 callers
Method
block_on
(&'static self, future: F)
src/thread_pool.rs:695
↓ 2 callers
Method
broadcast
(&'static self, f: F)
src/thread_pool.rs:738
↓ 2 callers
Method
completion_latch
(&self)
src/job.rs:303
↓ 2 callers
Method
find_local_work
(&self)
src/thread_pool.rs:1388
↓ 2 callers
Method
get_worker
(&'static self, func: F)
src/thread_pool.rs:370
↓ 2 callers
Function
increment
(worker: &Worker, slice: &mut [u32])
src/thread_pool.rs:2587
↓ 2 callers
Function
join
Executes the two closures, possibly in parallel. When executed on a thread that is currently registered as a worker (i.e. the closure inside [`Member
src/thread_pool.rs:2406
↓ 2 callers
Method
next
(&self)
src/util.rs:38
↓ 2 callers
Method
num_members
(&'static self)
src/thread_pool.rs:188
↓ 2 callers
Method
pop_oldest
Removes the oldest job in the queue.
src/job.rs:155
↓ 2 callers
Method
promote
(&self)
src/thread_pool.rs:1246
↓ 2 callers
Method
resize_to
Resizes the pool to the specified number of threads. Returns the new size of the thread pool. The new size may be smaller than requested if all the se
src/thread_pool.rs:238
↓ 2 callers
Method
run
Runs the specified commands or all commands if none are specified. When run locally, results may differ from actual CI runs triggered by `.github/wor
ci/src/ci.rs:24
↓ 2 callers
Method
semaphore
(&self)
src/thread_pool.rs:1064
↓ 2 callers
Method
spawn_broadcast
(&'static self, f: F)
src/thread_pool.rs:753
↓ 2 callers
Method
spawn_on
( &'static self, member_index: usize, work: S, )
src/thread_pool.rs:671
↓ 2 callers
Function
the_final_countdown
( scope: &'scope Scope<'scope, 'env>, bottom_of_stack: &'scope i32, max: &'scope Mutex
src/scope.rs:1425
↓ 2 callers
Method
unwrap_error
(mut self)
src/job.rs:369
↓ 2 callers
Method
unwrap_output
(mut self)
src/job.rs:343
↓ 2 callers
Function
visit
( size: usize, visited: &'env DashSet<(usize, usize)>, x: usize, y: usize,
benches/flood_fill.rs:75
↓ 2 callers
Method
yield_now
(&self)
src/thread_pool.rs:1489
↓ 1 callers
Method
add_reference
Adds an additional reference to the scope's reference counter. Every call to this should have a matching call to `Scope::remove_reference`, or the sc
src/scope.rs:302
↓ 1 callers
Function
block_on
Waits for a future to complete. When executed on a thread that is currently registered as a worker (i.e. the closure inside [`Membership::activate`],
src/thread_pool.rs:2383
↓ 1 callers
Method
broadcast_queue
(&self)
src/thread_pool.rs:1057
↓ 1 callers
Method
check
(&self)
src/latch.rs:75
↓ 1 callers
Method
complete
Waits for the scope to complete. # Safety The caller must ensure that this is called at most once.
src/scope.rs:405
↓ 1 callers
Function
divide_and_conquer
( scope: &'scope Scope<'scope, 'env>, counter: &'scope AtomicUsize, size: usize, )
src/scope.rs:1281
↓ 1 callers
Function
divide_and_conquer_seq
(counter: &AtomicUsize, size: usize)
src/scope.rs:1299
↓ 1 callers
Method
enroll
Waits for membership in the thread-pool. If the thread-pool is full (it has 32 members) this blocks.
src/thread_pool.rs:786
↓ 1 callers
Method
find_work
(&self)
src/thread_pool.rs:1406
↓ 1 callers
Function
increment
( counters: &'slice [&'counter AtomicUsize], )
src/scope.rs:1628
↓ 1 callers
Function
join_no_overhead
(a: A, b: B)
benches/fork_join.rs:44
↓ 1 callers
Function
managed_worker
This is the main loop for a worker thread. It's in charge of executing jobs. Operating on the principle that you should finish what you start before s
src/thread_pool.rs:2510
↓ 1 callers
Method
maybe_propagate_panic
Propagates any panic captured while the scope was executing.
src/scope.rs:379
↓ 1 callers
Method
poll
Polls the future. # Safety `this` must be a pointer produced by `Arc::into_raw` on an `Arc<Self>`. This call takes ownership of exactly one strong
src/scope.rs:700
↓ 1 callers
Method
pop_newest
Removes the newest job in the queue.
src/job.rs:145
↓ 1 callers
Method
prepare
(&self, sh: &'a xshell::Shell)
ci/src/ci.rs:62
↓ 1 callers
Method
promote_cold
(&self, current_tick: u64)
src/thread_pool.rs:1261
↓ 1 callers
Method
push_old
Insert a job at the front of the queue (the side with the oldest jobs).
src/job.rs:135
↓ 1 callers
Function
random_tree
(depth: usize, seed: u64)
src/scope.rs:1371
↓ 1 callers
Function
random_tree_inner
( depth: usize, rng: &mut XorShift64Star, )
src/scope.rs:1377
↓ 1 callers
Method
recover_newest
(&self, id: (usize, usize))
src/job.rs:166
↓ 1 callers
Method
reset
(&self)
src/latch.rs:189
↓ 1 callers
Method
signal_random
(&self, sleeping: u32)
src/thread_pool.rs:1333
↓ 1 callers
Function
spawn
Runs work in the background. When executed on a thread that is currently registered as a worker (i.e. the closure inside [`Membership::activate`], [`
src/thread_pool.rs:2339
↓ 1 callers
Method
split
Splits off a series of chunks from the end of the queue (the side with the newest jobs). Each chunk is of size `CHUNK_SIZE`. Afterwards, at most `CHUN
src/job.rs:186
↓ 1 callers
Method
steal_from_siblings
(&self)
src/thread_pool.rs:1420
↓ 1 callers
Function
ticks
()
src/time.rs:7
↓ 1 callers
Method
try_enroll
(&'static self)
src/thread_pool.rs:802
↓ 1 callers
Method
try_enroll_many
Creates multiple memberships for the thread pool.
src/thread_pool.rs:827
↓ 1 callers
Method
unwrap_func
(mut self)
src/job.rs:321
↓ 1 callers
Method
update
(&mut self, op: OP)
src/scope.rs:1342
↓ 1 callers
Method
update_in_scope
( &'env mut self, scope: &'scope Scope<'scope, 'env>, op: &'scope OP,
src/scope.rs:1350
↓ 1 callers
Method
wake_by_ref
Queues self to be executed without consuming the waker. # Safety Must be called with a pointer created by calling `Arc::into_raw` on an instance of
src/scope.rs:883
↓ 1 callers
Function
with_scope
(worker: &Worker, f: F)
src/scope.rs:112
↓ 1 callers
Method
with_worker_cold
(&'static self, func: F)
src/thread_pool.rs:404
↓ 1 callers
Method
yield_local
(&self)
src/thread_pool.rs:1462
Function
baseline
(bencher: Bencher, nodes: (usize, usize))
benches/fork_join.rs:43
Function
baseline
(bencher: Bencher, size: usize)
benches/flood_fill.rs:23
Function
baseline
(bencher: Bencher, size: usize)
benches/flat_scope.rs:20
next →
1–100 of 204, ranked by callers