← All docs

pcntl_getcpu()

Returns the logical CPU on which the calling thread is executing.

pcntl_getcpu()

function pcntl_getcpu(): int

Returns the logical CPU on which the calling thread is executing.

Parameters: none.

Returns: int

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how pcntl_getcpu is implemented in the compiler, see the internals page.