pyspark.BarrierTaskContext.cpus

BarrierTaskContext.cpus() → int

CPUs allocated to the task.

Returns
int

the number of CPUs.