mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
make pause/resume work in multithreaded environment
This commit is contained in:
parent
89f8326c0b
commit
eaadc55c7d
@ -181,7 +181,9 @@ class DefaultSessionProcessor(SessionProcessorBase):
|
|||||||
while True:
|
while True:
|
||||||
# Outer try block. Any error here is a fatal processor error
|
# Outer try block. Any error here is a fatal processor error
|
||||||
try:
|
try:
|
||||||
|
self._resume_event.wait()
|
||||||
session = self._session_worker_queue.get()
|
session = self._session_worker_queue.get()
|
||||||
|
|
||||||
if self._cancel_event.is_set():
|
if self._cancel_event.is_set():
|
||||||
if session.item_id in self._sessions_to_cancel:
|
if session.item_id in self._sessions_to_cancel:
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user