hey.. the code is to.... dirty.. but look this...<br><br>reactor.callLater(3,f)<br><br>for x in range(100000000000000): # for example... a big time-consumption<br> #do something<br>reactor.callLater(3,g)<br><br>the 'g' method will not start at the same time of 'f'
<br><br><br>the python sched module, in this same example is like this<br><br>s = sched..... bla..bla..<br><br>s.enter(3,1,f,())<br>for x in range(100000000000000): # for example... a big time-consumption<br>
#do something<br>s.enter(3,1,g,())<br><br>s.run()<br><br>in this case... 'f' and 'g' will be called at the "same" time..<br><br>thks.<br><br><br><div class="gmail_quote">On Jan 17, 2008 6:33 PM, Christopher Armstrong <
<a href="mailto:radix@twistedmatrix.com">radix@twistedmatrix.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>
</div><div class="Wj3C7c">On Jan 17, 2008 4:09 PM, Eduardo Matus <<a href="mailto:ematus@gmail.com">ematus@gmail.com</a>> wrote:<br>> hey all....<br>><br>> is there a way to add tasks and then run the timer in callLater from the
<br>> reactor class??<br>> like sched module in python...<br>><br>> because if I want to call 2 different functions at the "same" time..<br>><br>> reactor.callLater(3,f)<br>> reactor.callLater
(3,g)<br>><br>> the 'g' function will be called 'n' seconds after the 'f' method....<br><br></div></div>No it won't. They'll both be called at (almost) the same time. If<br>you're actually seeing g being called 3 seconds after f, there's
<br>probably something else wrong in your application. Please post a<br>minimal complete example showing your problem.<br><br>--<br>Christopher Armstrong<br>International Man of Twistery<br><a href="http://radix.twistedmatrix.com/" target="_blank">
http://radix.twistedmatrix.com/</a><br><a href="http://twistedmatrix.com/" target="_blank">http://twistedmatrix.com/</a><br><a href="http://canonical.com/" target="_blank">http://canonical.com/</a><br><br>_______________________________________________
<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
</a><br></blockquote></div><br>