Skip to content

Remove locking control ArrayPortals

Previously, when a ReadPortal or a WritePortal was returned from an ArrayHandle, it had wrapped in it a Token that was attached to the ArrayHandle. This Token would prevent other reads and writes from the ArrayHandle.

This added safety in the form of making sure that the ArrayPortal was always valid. Unfortunately, it also made deadlocks very easy. They happened when an ArrayPortal did not leave scope immediately after use (which is not all that uncommon).

Now, the ArrayPortal no longer locks up the ArrayHandle. Instead, when an access happens on the ArrayPortal, it checks to make sure that nothing has happened to the data being accessed. If it has, a fatal error is reported to the log.

Merge request reports