Skip to content

Commit

Permalink
feat: export task lock via lock property in TaskWorker class
Browse files Browse the repository at this point in the history
  • Loading branch information
provos committed Sep 5, 2024
1 parent 05959f2 commit 00c6c6b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/planai/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,16 @@ def name(self) -> str:
"""
return self.__class__.__name__

@property
def lock(self) -> threading.Lock:
"""
Returns the lock object for this worker.
:return: The lock object.
:rtype: threading.Lock
"""
return self._state_lock

@property
def last_input_task(self) -> Optional[Task]:
"""
Expand Down

0 comments on commit 00c6c6b

Please sign in to comment.