Added contributors file

This commit is contained in:
Eric Froemling 2020-04-15 16:16:05 -07:00
parent b11bb26f51
commit 2c324a91b6
2 changed files with 9 additions and 7 deletions

7
CONTRIBUTORS.md Normal file
View File

@ -0,0 +1,7 @@
# Ballistica Contributors
(please add your name and info here if you have contributed to the project)
### Eric Froemling
- Original author
- BDFL (benevolent dictator for life)

View File

@ -31,6 +31,8 @@ from __future__ import annotations
import os
import subprocess
from typing import TYPE_CHECKING
from multiprocessing import cpu_count
from concurrent.futures import ThreadPoolExecutor
if TYPE_CHECKING:
from typing import List, Dict, Tuple, Set
@ -250,10 +252,7 @@ def _write_cache_file(staging_dir: str, fname: str) -> Tuple[str, str]:
def _write_cache_files(fnames1: List[str], fnames2: List[str],
staging_dir: str, mapping_file: str) -> None:
# pylint: disable=too-many-locals
fhashes1: Set[str] = set()
from multiprocessing import cpu_count
from concurrent.futures import ThreadPoolExecutor
import functools
import json
mapping: Dict[str, str] = {}
@ -271,7 +270,6 @@ def _write_cache_files(fnames1: List[str], fnames2: List[str],
# on the server than it is to build it here and upload the whole thing.
# ...so let's simply write a script to generate it and upload that.
# yapf: disable
script = (
'import os\n'
'import subprocess\n'
@ -289,7 +287,6 @@ def _write_cache_files(fnames1: List[str], fnames2: List[str],
' check=True)\n'
'subprocess.run(["rm", "-rf", "efrocache", "genstartercache.py"])\n'
'print("Starter cache generation complete!", flush=True)\n')
# yapf: enable
with open('build/efrocache/genstartercache.py', 'w') as outfile:
outfile.write(script)
@ -320,8 +317,6 @@ def _check_warm_start_entry(entry: Tuple[str, str]) -> None:
def _check_warm_start_entries(entries: List[Tuple[str, str]]) -> None:
from multiprocessing import cpu_count
from concurrent.futures import ThreadPoolExecutor
with ThreadPoolExecutor(max_workers=cpu_count()) as executor:
# Converting this to a list pulls results and propagates errors)
list(executor.map(_check_warm_start_entry, entries))