[+] multiprocessing support
This commit is contained in:
parent
42627ccb62
commit
5428aa445f
@ -1,4 +1,5 @@
|
||||
import builtins
|
||||
import multiprocessing
|
||||
from collections import defaultdict
|
||||
|
||||
from loguru import logger
|
||||
@ -10,6 +11,8 @@ log_call = log.bind(prefix="call")
|
||||
|
||||
class EventsSystem:
|
||||
def __init__(self):
|
||||
if multiprocessing.current_process().name != "MainProcess":
|
||||
return
|
||||
self.__events = defaultdict(list)
|
||||
log.debug("Injected to builtins")
|
||||
builtins.event = self
|
||||
|
Loading…
x
Reference in New Issue
Block a user