mirror of
https://github.com/vale981/ray
synced 2025-03-10 13:26:39 -04:00
![]() Why are these changes needed? Current documentation code in Message passing using Ray Queue can be enhanced, for better demonstration of the message queue. It creates 10 tasks but only 2 consumers, and each consumer consumes one task then exit. Therefore, the output is a bit vague: (consumer pid=1022727) got work 0 (consumer pid=1022595) got work 1 So I make consumer working until the queue is empty. The output shows consumer 1 and 2 working in parallel: (consumer pid=1030876) consumer 0 got work 0 (consumer pid=1030876) consumer 0 got work 1 (consumer pid=1030876) consumer 0 got work 3 (consumer pid=1030876) consumer 0 got work 5 (consumer pid=1030876) consumer 0 got work 7 (consumer pid=1030876) consumer 0 got work 9 (consumer pid=1030949) consumer 1 got work 2 (consumer pid=1030949) consumer 1 got work 4 (consumer pid=1030949) consumer 1 got work 6 (consumer pid=1030949) consumer 1 got work 8 P.S. Also fix a typo in doc. |
||
---|---|---|
.. | ||
patterns | ||
actor-utils.rst | ||
async_api.rst | ||
concurrency_group_api.rst | ||
fault-tolerance.rst | ||
named-actors.rst | ||
out-of-band-communication.rst | ||
scheduling.rst | ||
task-orders.rst | ||
terminating-actors.rst |