| 19 | |
| 20 | |
| 21 | class AIterWrap: |
| 22 | def __init__(self, obj): |
| 23 | self._it = iter(obj) |
| 24 | |
| 25 | def __aiter__(self): |
| 26 | return self |
| 27 | |
| 28 | async def __anext__(self): |
| 29 | try: |
| 30 | value = next(self._it) |
| 31 | except StopIteration: |
| 32 | raise StopAsyncIteration |
| 33 | return value |
| 34 | |
| 35 | SLEEP_UNIT = 0.1 |
| 36 |