(index: int, item)
| 236 | base = current_branch().path + (current_branch().next_slot(),) |
| 237 | |
| 238 | async def guarded(index: int, item): |
| 239 | token = use_branch(base + (index,)) |
| 240 | try: |
| 241 | return await await_item(item) |
| 242 | except Exception: |
| 243 | return None # the barrier never rejects |
| 244 | finally: |
| 245 | reset_branch(token) |
| 246 | |
| 247 | return list(await asyncio.gather(*(guarded(i, it) for i, it in enumerate(items)))) |
| 248 |
no test coverage detected