mirror of
https://github.com/vale981/ray
synced 2025-03-08 19:41:38 -05: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. |
||
---|---|---|
.. | ||
actor-http-server.py | ||
actor-pool.py | ||
actor-queue.py | ||
actor-repr.py | ||
actor-sync.py | ||
deser.py | ||
get_or_create.py | ||
metrics_example.py | ||
obj_capture.py | ||
obj_ref.py | ||
obj_val.py | ||
runtime_env_example.py | ||
task_locality_aware_scheduling.py | ||
tasks.py | ||
tf_example.py | ||
torch_example.py |