j*a 发帖数: 14423 | 1 有没有定时器那样的东西,定时执行一个函数的。pexpect看了不行
tcl的expect就有一个timeout {}的玩意儿。 |
b******n 发帖数: 592 | 2 kron
【在 j*a 的大作中提到】 : 有没有定时器那样的东西,定时执行一个函数的。pexpect看了不行 : tcl的expect就有一个timeout {}的玩意儿。
|
r****t 发帖数: 10904 | 3 use threading, make a loop that calls a callable every some minutes. |
b******n 发帖数: 592 | 4 python threading is not real thread. I had a lot problem with it.
【在 r****t 的大作中提到】 : use threading, make a loop that calls a callable every some minutes.
|
d***q 发帖数: 1119 | 5 python thread is exactly a real thread
hwoever it is restricted to GIL
python interpreter allow only one thread running at any time.
【在 b******n 的大作中提到】 : python threading is not real thread. I had a lot problem with it.
|
b******n 发帖数: 592 | 6 I don't know what is a real thread. Python thread is fake. In real life, blo
cking one thread will not block other thread. In python, it will block every
thing.
【在 d***q 的大作中提到】 : python thread is exactly a real thread : hwoever it is restricted to GIL : python interpreter allow only one thread running at any time.
|
c********x 发帖数: 84 | 7 read the date time, then you know how to do the rest.... |
r****t 发帖数: 10904 | 8 no way!!!!
block one python thread, 当然不会block any other python
thread,要不还怎么叫thread?
blo
every
【在 b******n 的大作中提到】 : I don't know what is a real thread. Python thread is fake. In real life, blo : cking one thread will not block other thread. In python, it will block every : thing.
|
r****t 发帖数: 10904 | 9 用twisted:
reactor.callLater(delay, func)
然后在func里面载接着call reactor.callLater就行了。
【在 j*a 的大作中提到】 : 有没有定时器那样的东西,定时执行一个函数的。pexpect看了不行 : tcl的expect就有一个timeout {}的玩意儿。
|