Function SetLogicalProcessor() Foundation

Assign the process to a logical processor unit.

Syntax
SetLogicalProcessor( [<nLogicalProcessor>] ) --> nOldLogicalProcessor
Parameters
<nLogicalProcessor>
The optional numeric parameter <nLogicalProcessor> specifies the logical processor the application is assigned to.
Return

The numeric value returned identifies the logical processor where the application was previously assigned to.

Description

A processor is generally a unit able to execute operations. A Logical Processor is the term used to represent the fact that today:

A processor can be virtual (vmware, MS hyper-v).
A physical CPU/Processor can have multiple cores/processors.
A hyper-threading capable core is divided into two logical processing units.

The term Logical Processor describes what we see from a software perspective as the processing unit.

Examples
SetLogicalProcessor()
// Assign the Process randomly to a logical processor unit 

PROCEDURE Main 

   SetLogicalProcessor( RandomInt(GetLogicalProcessorCount()) ) 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.