Python中是否有与PHP中的线程模块等效的模块

2024-09-30 01:31:04 发布

您现在位置:Python中文网/ 问答频道 /正文

Python中是否有与PHP中的线程模块等效的模块?我的Python代码看起来像

from Treading import thread

def somefunction():
    print("function")

t = Thread(target = somefunction)        
t.start()

有没有办法把这样的代码转换成PHP,如果有,怎么转换? 谢谢。你知道吗


Tags: 模块代码fromimporttargetdeffunction线程

热门问题