vpi.Container.lock_cpu
- Container.lock_cpu(self: vpi.Container, mode: vpi.Lock = vpi.Lock.READ_WRITE) vpi.Container.Lock
Lock the container data in
CPU
.Hint
This allows the container data to be accessed in a with statement, using the item target as the data itself. Example:
with container.lock_cpu(vpi.Lock.READ) as data:
.Note
The data returned is not a copy of the container data.
- Parameters
mode (vpi.Lock, optional) – Lock mode defines how the data will be accessed.
- Returns
Access container data using the as of a with statement.
- Return type
vpi.Container.Lock