python中的线程支持 [英] threading support in python

查看:63
本文介绍了python中的线程支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


是否有任何PEP将真正的线程功能引入python'的
下一版本,就像在java中一样?我的意思是没有GIL。

与其他语言相比,python对代码很有趣但是我觉得它在线程中缺乏



问候,

KM

解决方案




GIL不会去。您可能需要阅读
http://blog.ianbicking .org / gil-of-doom.html


问候,

-Justin


大家好,

有没有其他方法可以在python中获得真正的线程?

如果GIL没有去,那么这是否意味着python是无用的

计算密集型科学应用程序需要在线程上下文中进行并行化?


问候,

KM

------------------------------------- --------------------------------------

2006年9月4日07:58:00 -0700,bayerj< ba **** @ in.tum.dewrote:





GIL不会去。您可能需要阅读
http://blog.ianbicking .org / gil-of-doom.html


问候,

-Justin


-
http://mail.python.org / mailman / listinfo / python-list





你可能想拆分你计算到不同的

工人流程。


然后你可以使用POSH [1]来共享数据和对象。

您甚至可能希望更进一步,通过

套接字/ XML-RPC或类似的方式共享数据。这使得在特定的计算中很容易抛出

aditional box,因为它可以在

中立即设置。

你可以甚至使用Twisted Spread [2]和它的透视经纪人在更高的层次上做




如果这不是你想要的,那么你留下Java我猜。


问候,

-Justin


[1] http://poshmodule.sourceforge.net/

[2] http://twistedmatrix.com/projects/co.../howto /pb.html


Hi all,

Is there any PEP to introduce true threading features into python''s
next version as in java? i mean without having GIL.
when compared to other languages, python is fun to code but i feel its
is lacking behind in threading

regards,
KM

解决方案

Hi,

GIL won''t go. You might want to read
http://blog.ianbicking.org/gil-of-doom.html .

Regards,
-Justin


Hi all,
Are there any alternate ways of attaining true threading in python ?
if GIL doesnt go then does it mean that python is useless for
computation intensive scientific applications which are in need of
parallelization in threading context ?

regards,
KM
---------------------------------------------------------------------------
On 4 Sep 2006 07:58:00 -0700, bayerj <ba****@in.tum.dewrote:

Hi,

GIL won''t go. You might want to read
http://blog.ianbicking.org/gil-of-doom.html .

Regards,
-Justin

--
http://mail.python.org/mailman/listinfo/python-list


Hi,

You might want to split your calculation onto different
worker-processes.

Then you can use POSH [1] to share data and objects.
You might even want to go a step further and share the data via
Sockets/XML-RPC or something like that. That makes it easy to throw
aditional boxes at a specific calculation, because it can be set up in
about no time.
You can even use Twisted Spread [2] and its perspective broker to do
this on a higher level.

If that''s not what you want, you are left with Java I guess.

Regards,
-Justin

[1] http://poshmodule.sourceforge.net/
[2] http://twistedmatrix.com/projects/co.../howto/pb.html


这篇关于python中的线程支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆