Functions and Directives

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 (the chip you mount on your Motherboard) contains one or more cores.
A hyper-threading capable core is divided into two logical cores (Pentium 4 HT or current XEONs, i7xxx).

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.