Rémi Lapeyre <remi.lape...@henki.fr> added the comment: In general examples in the documentation may lack some things like imports as they are implicit but in this case it also lack do_work(), source() and num_worker_threads.
You could use os.cpu_count() instead of your hard-coded value and the comment. Can you open a pull request with your change? ---------- nosy: +remi.lapeyre _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40387> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com