Message321220
To be frank, I don't think that matters much. The user should understand what a lock is already, if they want to make use of multiprocessing fruitfully. The example showcases how to create a lock and how to pass it to child processes (by giving it as a function parameter). Printing to standard output is not the important thing here.
However if you want to improve this example, you could replace the acquire/release pair with a "with" statement. |
|
Date |
User |
Action |
Args |
2018-07-07 15:47:44 | pitrou | set | recipients:
+ pitrou, docs@python, zach.ware, davin, Windson Yang |
2018-07-07 15:47:44 | pitrou | set | messageid: <1530978464.01.0.56676864532.issue34051@psf.upfronthosting.co.za> |
2018-07-07 15:47:44 | pitrou | link | issue34051 messages |
2018-07-07 15:47:43 | pitrou | create | |
|