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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #do something<br>reactor.callLater(3,g)<br><br>the &#39;g&#39; method will not start at the same time of &#39;f&#39;
<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #do something<br>s.enter(3,1,g,())<br><br>s.run()<br><br>in this case... &#39;f&#39; and &#39;g&#39; will be called at the &quot;same&quot; time..<br><br>thks.<br><br><br><div class="gmail_quote">On Jan 17, 2008 6:33 PM, Christopher Armstrong &lt;
<a href="mailto:radix@twistedmatrix.com">radix@twistedmatrix.com</a>&gt; 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 &lt;<a href="mailto:ematus@gmail.com">ematus@gmail.com</a>&gt; wrote:<br>&gt; hey all....<br>&gt;<br>&gt; is there a way to add tasks &nbsp;and then run the timer in callLater from the
<br>&gt; reactor class??<br>&gt; like sched module in python...<br>&gt;<br>&gt; because if I want to call 2 different functions at the &quot;same&quot; time..<br>&gt;<br>&gt; reactor.callLater(3,f)<br>&gt; reactor.callLater
(3,g)<br>&gt;<br>&gt; the &#39;g&#39; function will be called &#39;n&#39; seconds after the &#39;f&#39; method....<br><br></div></div>No it won&#39;t. They&#39;ll both be called at (almost) the same time. If<br>you&#39;re actually seeing g being called 3 seconds after f, there&#39;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>