tom-pytel commented on pull request #138:
URL: https://github.com/apache/skywalking-python/pull/138#issuecomment-905502679
> Well, the `block` is `False` by default...
`True` by default.
```py
def report(self, queue: Queue, block: bool = True):
start = time()
def generator():
while True:
try:
timeout = config.QUEUE_TIMEOUT - int(time() - start) #
type: int
if timeout <= 0: # this is to make sure we exit
eventually instead of being fed continuously
return
segment = queue.get(block=block, timeout=timeout) #
type: Segment
except Empty:
return
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]