Message357247
Thanks for having an interest in this issue.
I thought asyncio.Queue guarantees the order of items as .put called after I
read the code. But it does not.
I attach poc code here.
In my machine, this program prints this message and exits.
$ python poc-oooput.py
num=1, last_read_num=0
num=33, last_read_num=1
Traceback (most recent call last):
File "poc-oooput.py", line 47, in <module>
asyncio.run(main())
File "/home/esrse/.pyenv/versions/3.7.3/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/home/esrse/.pyenv/versions/3.7.3/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "poc-oooput.py", line 44, in main
await stream.read()
File "poc-oooput.py", line 20, in read
assert num == self._last_read_num + 1
AssertionError
This shows you that the 33rd item is put before the 2nd item. |
|
Date |
User |
Action |
Args |
2019-11-22 06:43:48 | esrse | set | recipients:
+ esrse, asvetlov, yselivanov, josh.r |
2019-11-22 06:43:48 | esrse | set | messageid: <1574405028.72.0.244646997372.issue38874@roundup.psfhosted.org> |
2019-11-22 06:43:48 | esrse | link | issue38874 messages |
2019-11-22 06:43:48 | esrse | create | |
|