You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a complicated data structure where Roy data structures are defined within another Roy.remote data structure, developers accidentally try to lock the inner lock inside the critical section (=while the outer class is already holding the hierarchical locks).
For this case, we can skip the locking/unlocking in __enter__ and __exit__, because a single instance of Roy data structure or class should be accessible by a single thread. In other words, each Ray worker has its own instance of the data structure.
Example:
- Class A
- Class B
When the outer class is locked, say with Class A:, the inner class (Class B) is also locked automatically.
When a developer accidentally does with Class B: within with Class A:, if we can confidently detect this occurrence, we can skip locking/unlocking around with Class B: and going out of the context.
The text was updated successfully, but these errors were encountered:
For a complicated data structure where Roy data structures are defined within another
Roy.remote
data structure, developers accidentally try to lock the inner lock inside the critical section (=while the outer class is already holding the hierarchical locks).__enter__
and__exit__
, because a single instance of Roy data structure or class should be accessible by a single thread. In other words, each Ray worker has its own instance of the data structure.Example:
with Class A:
, the inner class (Class B
) is also locked automatically.with Class B:
withinwith Class A:
, if we can confidently detect this occurrence, we can skip locking/unlocking aroundwith Class B:
and going out of the context.The text was updated successfully, but these errors were encountered: