Compartir a través de


Context::VirtualProcessorId Method

Returns an identifier for the virtual processor that the current context is executing on.

static unsigned int __cdecl VirtualProcessorId();

Return Value

If the current context is attached to a scheduler, an identifier for the virtual processor that the current context is executing on; otherwise, the value -1.

Remarks

The return value from this method is an instantaneous sampling of the virtual processor that the current context is executing on. This value can be stale the moment it is returned and cannot be relied upon. Typically, this method is used for debugging or tracing purposes only.

Requirements

Header: concrt.h

Namespace: concurrency

See Also

Reference

Context Class