threading.Timer()

threading.Timer(),第1张

threading.Timer()

您只需要将参数

hello
放入函数调用中的单独项中,就像这样,

t = threading.Timer(10.0, hello, [h])

这是Python中的常用方法。否则,当您使用时

Timer(10.0,hello(h))
,此函数调用的结果将传递到
Timer
None
因为
hello
这不会显式返回。



欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5632404.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存