vpi.Container.rwlock_cpu

Container.rwlock_cpu(self: vpi.Container) vpi.Container.Lock

Lock the container data for read-and-write access 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.rwlock_cpu() as data:.

Note

The data returned is not a copy of the container data.

Returns

Access container data using the as of a with statement.

Return type

vpi.Container.Lock