Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Feb 7, 2024
1 parent d2592a6 commit 4531cdd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/sticker_convert/utils/callback.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
#!/usr/bin/env python3
from queue import Queue
from multiprocessing.managers import SyncManager
from multiprocessing import Queue, Event
from typing import Callable, Optional, Union, Any

from tqdm import tqdm


class CallbackReturn:
def __init__(self):
self.manager = SyncManager()
self.manager.start()

self.response_event = self.manager.Event()
self.response_queue: Queue[Any] = self.manager.Queue()
self.response_event = Event()
self.response_queue: Queue[Any] = Queue()

def set_response(self, response: Any):
self.response_queue.put(response)
Expand Down

0 comments on commit 4531cdd

Please sign in to comment.