Learn R Programming

shard (version 0.1.0)

set_affinity: Set CPU affinity for the current process

Description

Intended to be called inside a worker process (e.g., via clusterCall()). On unsupported platforms, returns FALSE.

Usage

set_affinity(cores)

Value

A logical scalar; TRUE on success, FALSE if not supported.

Arguments

cores

Integer vector of 0-based CPU core ids.

Examples

Run this code
affinity_supported()

Run the code above in your browser using DataLab