ray/doc/source/ray-core/doc_code
Ofey Chan c6c72a6f89
[Doc] [Core] Enhance actor queue doc code (#24532)
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.
2022-05-15 17:38:21 -07:00
..
actor-http-server.py Add actor out-of-band communication doc (#24185) 2022-05-03 21:36:26 -07:00
actor-pool.py [docs] Core docs refactor (#23216) 2022-03-17 11:26:17 -07:00
actor-queue.py [Doc] [Core] Enhance actor queue doc code (#24532) 2022-05-15 17:38:21 -07:00
actor-repr.py [docs] Add documentation on how to handle read-only arrays and actor reprs (#24410) 2022-05-02 23:52:54 -07:00
actor-sync.py [docs] Core docs refactor (#23216) 2022-03-17 11:26:17 -07:00
deser.py [docs] Add documentation on how to handle read-only arrays and actor reprs (#24410) 2022-05-02 23:52:54 -07:00
get_or_create.py Add a get_if_exists option for simpler creation of named actors (#23344) 2022-03-23 22:02:58 -07:00
metrics_example.py [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00
obj_capture.py [doc] Improve the object reference documentation (#24636) 2022-05-10 18:39:16 -07:00
obj_ref.py [doc] Improve the object reference documentation (#24636) 2022-05-10 18:39:16 -07:00
obj_val.py [doc] Improve the object reference documentation (#24636) 2022-05-10 18:39:16 -07:00
runtime_env_example.py [runtime env][strong-typed API] Combine ParsedRuntimeEnv and RuntimeEnv into ray.runtime.RuntimeEnv (#22522) 2022-02-28 16:18:10 +08:00
task_locality_aware_scheduling.py [Doc] Improve doc for task locality aware scheduling (#24717) 2022-05-12 13:42:48 -07:00
tasks.py [docs] Core docs refactor (#23216) 2022-03-17 11:26:17 -07:00
tf_example.py [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00
torch_example.py [docs] sphinx gallery removal, migrate to ipynb (#22467) 2022-02-19 01:19:07 -08:00