Skip to content

Commit

Permalink
Fix possible deadlock on stop() (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
aniezurawski committed Nov 21, 2022
1 parent d4ae119 commit 2dfa961
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/neptune/new/metadata_containers/metadata_container.py
Expand Up @@ -199,9 +199,10 @@ def stop(self, seconds: Optional[Union[float, int]] = None) -> None:
self._bg_job.stop()
self._bg_job.join(seconds)
logger.info("Done!")
with self._lock:
sec_left = None if seconds is None else seconds - (time.time() - ts)
self._op_processor.stop(sec_left)

sec_left = None if seconds is None else seconds - (time.time() - ts)
self._op_processor.stop(sec_left)

if self._mode != Mode.OFFLINE:
logger.info("Explore the metadata in the Neptune app:")
logger.info(self._metadata_url)
Expand Down

0 comments on commit 2dfa961

Please sign in to comment.