prepare webhost for multi-game per-slot downloads

This commit is contained in:
Fabian Dill
2021-05-14 15:25:57 +02:00
parent 23678b814d
commit 19896e1fae
11 changed files with 61 additions and 57 deletions

View File

@@ -28,6 +28,7 @@ class AlreadyRunningException(Exception):
if sys.platform == 'win32':
import os
class Locker(CommonLocker):
def __enter__(self):
try:
@@ -46,6 +47,7 @@ if sys.platform == 'win32':
else: # unix
import fcntl
class Locker(CommonLocker):
def __enter__(self):
try:
@@ -148,6 +150,7 @@ multiworlds = {}
guardians = concurrent.futures.ThreadPoolExecutor(2, thread_name_prefix="Guardian")
class MultiworldInstance():
def __init__(self, room: Room, config: dict):
self.room_id = room.id
@@ -172,7 +175,7 @@ class MultiworldInstance():
self.process = None
def _collect(self):
self.process.join() # wait for process to finish
self.process.join() # wait for process to finish
self.process = None
self.guardian = None