You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use queue.consume but it seems work in sequence,I want that main thread create a new sub coroutine for handle msg when new msg coming
here is my code
consumer.py
Message body is: b'0'
Message body is: b'1'
Message body is: b'2'
finish
Message body is: b'3'
Message body is: b'4'
Message body is: b'5'
Message body is: b'6'
Message body is: b'7'
Message body is: b'8'
Message body is: b'9'
expect output:
Message body is: b'0'
Message body is: b'1'
Message body is: b'3'
Message body is: b'4'
Message body is: b'5'
Message body is: b'6'
Message body is: b'7'
Message body is: b'8'
Message body is: b'9'
Message body is: b'2'
finish
whatever,2 should be lastest
The text was updated successfully, but these errors were encountered:
I use
queue.consume
but it seems work in sequence,I want that main thread create a new sub coroutine for handle msg when new msg cominghere is my code
consumer.py
producer.py
actual output:
expect output:
whatever,2 should be lastest
The text was updated successfully, but these errors were encountered: