mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Starting using multiprocessing module in Vulkan, now creating a new bot for each guild when played, multiple issues yet
This commit is contained in:
22
Parallelism/ProcessContext.py
Normal file
22
Parallelism/ProcessContext.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from multiprocessing import Process, Queue, Lock
|
||||
from Music.Playlist import Playlist
|
||||
|
||||
|
||||
class ProcessContext:
|
||||
def __init__(self, process: Process, queue: Queue, playlist: Playlist, lock: Lock) -> None:
|
||||
self.__process = process
|
||||
self.__queue = queue
|
||||
self.__playlist = playlist
|
||||
self.__lock = lock
|
||||
|
||||
def getProcess(self) -> Process:
|
||||
return self.__process
|
||||
|
||||
def getQueue(self) -> Queue:
|
||||
return self.__queue
|
||||
|
||||
def getPlaylist(self) -> Playlist:
|
||||
return self.__playlist
|
||||
|
||||
def getLock(self) -> Lock:
|
||||
return self.__lock
|
||||
Reference in New Issue
Block a user