On Wed, Nov 6, 2019 at 11:15 AM Rhodri James <rho...@kynesim.co.uk> wrote:

> On 06/11/2019 16:02, Spencer Du wrote:
> > Why is importing modules in parallel bad?
>
> To put it as simply as I can:
>
> 1. The import mechanism is complicated, even the bits that are
> user-visible.  Fiddling with it has a high chance of going wrong.
>
> 2. Multi-threading is less complicated than import, but still requires a
> lot of careful thought.  For example you've asserted that the modules
> you want to import simultaneously, but you also need to consider the
> import mechanism itself.
>
> Put 1 and 2 together, and multi-threaded import sounds like a nightmare.
>
> --
> Rhodri James *-* Kynesim Ltd
> --
> https://mail.python.org/mailman/listinfo/python-list
>


After spending way too much time chasing my tail down the rabbit hole on a
similar project I decided that using the work of others was more
productive. I've been using parallel with good success. Depends on how much
you need to share with the different components. For details see
https://www.gnu.org/software/parallel/


-- 

**** Listen to my FREE CD at http://www.mellowood.ca/music/cedars ****
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: b...@mellowood.ca
WWW:   http://www.mellowood.ca
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to