Skip to content

Commit

Permalink
fix: avoid acquiring the lock when feature already initialized (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhanghyi authored Oct 16, 2024
1 parent a499a87 commit c4a8e00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions graphlearn_torch/python/data/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ def from_ipc_handle(cls, ipc_handle):
return feature

def lazy_init_with_ipc_handle(self):
if self._ipc_handle is None:
return
with scope_lock:
if self._ipc_handle is None:
return
Expand Down

0 comments on commit c4a8e00

Please sign in to comment.