Skip to content

Commit a809fc9

Browse files
committed
Fix race between property setter and use.
1 parent b7a5534 commit a809fc9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tasks/dataflow/graph_loader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ def __init__(
5858
require_inst2vec: bool = False,
5959
max_queue_size: int = 512,
6060
):
61+
self._stopped = False
62+
6163
self.graph_path = path / epoch_pb2.EpochType.Name(epoch_type).lower()
6264
if not self.graph_path.is_dir():
6365
raise FileNotFoundError(str(self.graph_path))
@@ -88,7 +90,6 @@ def __init__(
8890
self._outq = Queue(maxsize=max_queue_size)
8991
self._thread = threading.Thread(target=self._Worker)
9092
self._thread.start()
91-
self._stopped = False
9293

9394
def Stop(self):
9495
if self._stopped:

0 commit comments

Comments
 (0)