Поделиться через


Context::VirtualProcessorId Method

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

_CRTIMP 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 may 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