fix multithreaded import racing condition when frozen

This commit is contained in:
Fabian Dill
2020-07-10 22:43:54 +02:00
parent d190fe65c6
commit f27d9e904f
3 changed files with 13 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ import sys
from typing import Tuple, Optional
import Utils
from Rom import JAP10HASH, read_rom
from Rom import JAP10HASH
def get_base_rom_path(file_name: str = "") -> str:
@@ -23,6 +23,7 @@ def get_base_rom_path(file_name: str = "") -> str:
def get_base_rom_bytes(file_name: str = "") -> bytes:
from Rom import read_rom
base_rom_bytes = getattr(get_base_rom_bytes, "base_rom_bytes", None)
if not base_rom_bytes:
file_name = get_base_rom_path(file_name)
@@ -160,3 +161,4 @@ if __name__ == "__main__":
import traceback
traceback.print_exc()
input("Press enter to close.")