MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / thread_count

Function thread_count

src/classmap_scanner.rs:145–149  ·  view source on GitHub ↗

Return the number of available CPU cores, capped at a sensible default. Used to size parallel scanning batches.

()

Source from the content-addressed store, hash-verified

143/// Return the number of available CPU cores, capped at a sensible
144/// default. Used to size parallel scanning batches.
145fn thread_count() -> usize {
146 std::thread::available_parallelism()
147 .map(|n| n.get())
148 .unwrap_or(4)
149}
150
151/// Build a classmap by scanning all `.php` files under the given
152/// directories.

Callers 3

scan_files_parallel_psr4Function · 0.85
scan_files_parallel_fullFunction · 0.85

Calls 2

mapMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected