Thank you very much.
I tried to implement your code.
Suppose, I have algorithm:
def algo():
# algoritm itself here:
and its wrapper, so not to insert timing code into algorithm:
def wrap_algo():
return algo()
Now, your code:
@time_limit(20)
def algorithm():
while True:
algorithm.die_on_timeout()
print 'sleep'
time.sleep(1)
algorithm()
Where to write wrap_algo()? In other words where to invoke algorithm?
Or you meant, that I need to check time deeply in algoritm between sequence
of rules?
Is there any way to do this logic outside algorithm, as I have other
calculators and this is not convenient to chek time in each of them?
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.