jina.serve.stream.helper module#
- class jina.serve.stream.helper.AsyncRequestsIterator(iterator, request_counter=None, prefetch=0)[source]#
Bases:
object
Iterator to allow async iteration of blocking/non-blocking iterator from the Client
Async request iterator
- Parameters:
iterator (
Union
[Iterator
,AsyncIterator
]) – request iteratorrequest_counter (
Optional
[_RequestsCounter
]) – counter of the numbers of request being handled at a given momentprefetch (
int
) – The max amount of requests to be handled at a given moment (0 disables feature)