Re: Threading

Markus Schaber



I’m not that deep into the details, but the IronPython threading module internally uses .NET APIs like System.Thread to create and manage its threads. So IronPython Threads are effectively equal to .NET Threads, only with Python API layer on top.


Usually, Threads are distributed to different cores if you don’t configure threads explicitly – however, you’re also responsible for proper synchronization, and the IronPython semantics differ from the normal cPython semantics as IronPython has no global interpreter lock.


Mit freundlichen Grüßen / Best regards

Markus Schaber

software Automation.

CODESYS Development GmbH
A member of the CODESYS Group

Markus Schaber | Team Leader Automation Server
Tobias-Dannheimer-Str. 5 | 87439 Kempten | Germany
Tel. +49-831-54031-979
m.schaber@... |

CODESYS Online Help:

Geschäftsführer / CEOs: Dipl.-Inf. Dieter Hess, Dipl.-Inf. Manfred Werner
Handelsregister / Trade register: Kempten HRB 13379
| USt-IDNr. / Tax ID No.: DE 307355786

Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind
oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received
this e-mail in error, please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure
or distribution of the material in this e-mail is strictly forbidden.

Von: <> Im Auftrag von Hailiang Shen
Gesendet: Freitag, 5. Juni 2020 16:52
Betreff: [ironpython] Threading


Hello all, could I get your help in understanding the IronPython threading module, specifically:

-          is it different from the .NET System.Thread class e.g. in implementation and performance?

-          with the IronPython threading module, if I created a number of N threads, will they be distributed by the operation system (e.g. Windows in my case) to different cores of a CPU to optimize the workload?


Your input is greatly appreciated.



Join to automatically receive all group messages.