vpi.Container.rwlock
- Container.rwlock(self: vpi.Container, memtype: vpi.MemType) vpi.Container.Lock
Lock the container data for
read-and-write
access.Hint
This allows the container data to be accessed in a with statement, using the item target as the data itself. Example:
with container.rwlock(vpi.MemType.CPU) as data:
.Note
The data returned is not a copy of the container data.
- Parameters
memtype (vpi.MemType) – The memory type where the data will reside.
- Returns
Access container data using the as of a with statement.
- Return type
vpi.Container.Lock