You do need to be careful with imports and other global side-effects. The last 
time I did some threaded work in IP, the dictionary structure that contained 
the imported modules for the engine was not thread-safe. And I don't recall 
seeing anything committed that would have changed that. If you pre-import the 
modules prior to forking then it's fine - using a cached module is OK, it's 
just adding newly loaded modules to the cache that causes trouble. And I'm sure 
there are other similar situations.

Actual execution of scripts that are side-effect-free is perfectly fine.


Keith Rome
Principal Architect @ Wintellect (www.wintellect.com<http://www.wintellect.com>)
770.617.4016 | kr...@wintellect.com<mailto:r...@wintellect.com>

[cid:5B509F53-9AEB-4247-A9A4-CA642CCFBCBB]
Register today<https://www.wintellectnow.com/Account/Promo/ROME-13> for access 
to our high-quality on-demand training resources!

From: Jeff Hardy <jdha...@gmail.com<mailto:jdha...@gmail.com>>
Date: Friday, January 17, 2014 at 7:36 AM
To: Bernd Viehmann 
<bernd.viehm...@googlemail.com<mailto:bernd.viehm...@googlemail.com>>
Cc: "ironpython-users@python.org<mailto:ironpython-users@python.org>" 
<ironpython-users@python.org<mailto:ironpython-users@python.org>>
Subject: Re: [Ironpython-users] multi-core programming with iron-python

On Fri, Jan 17, 2014 at 9:35 AM, Bernd Viehmann
<bernd.viehm...@googlemail.com<mailto:bernd.viehm...@googlemail.com>> wrote:
Hi folks,

in the python wiki i have read the following statement:

" IronPython has no GIL and multi-threaded code can use multi core
processors"
https://wiki.python.org/moin/IronPython

Is there anything special to take care off? Or do i just to impotz and use
the thread-module of python. I want to write a script which will read data
from a ado.net data-table in memory. it should be able to use all cores
available on the host.

The only special care you have to take is what you normally would when
writing multithreaded code.

If you do hit any issues they might be bugs, so please report what you find.

- Jeff



thanks much and regards

bernd

--

Mit freundlichen Grüßen

Bernd Viehmann
Mahrweg 46
41836 Hückelhoven

Tel.: 02433 9640 100
Fax: 02433 9640 109

_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org<mailto:Ironpython-users@python.org>
https://mail.python.org/mailman/listinfo/ironpython-users

_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org<mailto:Ironpython-users@python.org>
https://mail.python.org/mailman/listinfo/ironpython-users

<<inline: 529A2558-817C-467F-8E7E-0789B90D675C[18].png>>

_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to