(*args, **kwargs)
| 87 | |
| 88 | @wraps(func) |
| 89 | def wrapper(*args, **kwargs) -> Iterator[Ret]: |
| 90 | # Run plugin methods concurrently for faster I/O-bound lookups. |
| 91 | with ThreadPoolExecutor() as executor: |
| 92 | futures = { |
| 93 | executor.submit( |
| 94 | # Evaluate iterator with list such that results are ready when |
| 95 | # future.result() is called. |
| 96 | materialize, |
| 97 | plugin, |
| 98 | method_name, |
| 99 | *args, |
| 100 | **kwargs, |
| 101 | ): plugin |
| 102 | for plugin in find_metadata_source_plugins() |
| 103 | } |
| 104 | |
| 105 | for future in as_completed(futures): |
| 106 | plugin = futures[future] |
| 107 | with maybe_handle_plugin_error(plugin, method_name): |
| 108 | yield from filter(None, future.result()) |
| 109 | |
| 110 | return wrapper |
| 111 |
nothing calls this directly
no test coverage detected