[Ironpython-users] multi-core programming with iron-python

Keith Rome rome at Wintellect.com
Fri Jan 17 18:53:02 CET 2014


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 | krome at wintellect.com<mailto:rome at 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 <jdhardy at gmail.com<mailto:jdhardy at gmail.com>>
Date: Friday, January 17, 2014 at 7:36 AM
To: Bernd Viehmann <bernd.viehmann at googlemail.com<mailto:bernd.viehmann at googlemail.com>>
Cc: "ironpython-users at python.org<mailto:ironpython-users at python.org>" <ironpython-users at python.org<mailto:ironpython-users at python.org>>
Subject: Re: [Ironpython-users] multi-core programming with iron-python

On Fri, Jan 17, 2014 at 9:35 AM, Bernd Viehmann
<bernd.viehmann at googlemail.com<mailto:bernd.viehmann at 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 at python.org<mailto:Ironpython-users at python.org>
https://mail.python.org/mailman/listinfo/ironpython-users

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140117/fa9193ba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 529A2558-817C-467F-8E7E-0789B90D675C[18].png
Type: image/png
Size: 6285 bytes
Desc: 529A2558-817C-467F-8E7E-0789B90D675C[18].png
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140117/fa9193ba/attachment.png>


More information about the Ironpython-users mailing list