be more explicit about asyncio usage

`get_event_loop()` would always implicitly create one on demand, but
Python upstream has decided it's a bad/confusing API. Explicitly
starting our own, then setting it, is exactly equivalent other than not
being scheduled for deprecation.
pull/11215/head
Eli Schwartz 2 years ago
parent 40315e6ebb
commit c5e766af75
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 3
      mesonbuild/msubprojects.py

@ -699,7 +699,8 @@ def run(options: 'Arguments') -> int:
raise MesonException(f'Unknown subproject type {t!r}, supported types are: {ALL_TYPES_STRING}')
tasks: T.List[T.Awaitable[bool]] = []
task_names: T.List[str] = []
loop = asyncio.get_event_loop()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
executor = ThreadPoolExecutor(options.num_processes)
if types:
wraps = [wrap for wrap in wraps if wrap.type in types]

Loading…
Cancel
Save