so i guess, verifying time in a regular way, will consume ressources?
so do i use a separated thread only redicated to checking if it's time
to print "hello"? there is no shared ressources, since i use a
database call, that will post a message only at a given time.
> wrote:
> hi,
> sorry for this queston ;)
> here is the code:
> if time = 18:00 pm, then print "hello"
> so i guess, verifying time in a regular way, will consume ressources?
> so do i use a separated thread only redicated to checking if it's time
> to print "hello"? there is no shared ressources, since i use a
> database call, that will post a message only at a given time.
then i must use a special thread for listening to time and waiting
till the 18:00 gets? and do i receivre a confirmatio that the
operation has done correctly? because if i automate it, imagine that
at 17:59 there is a bug on the machine, and it will restarts at
18:01 !!!!
On 10 oct, 23:41, Jean Chassoul <chass...@gmail.com> wrote:
> I think the timeouts section it's what you're looking for...
> Regards,
> Jean
> On Wed, Oct 10, 2012 at 4:02 PM, aliane abdelouahab <alabdeloua...@gmail.com
> > wrote:
> > hi,
> > sorry for this queston ;)
> > here is the code:
> > if time = 18:00 pm, then print "hello"
> > so i guess, verifying time in a regular way, will consume ressources?
> > so do i use a separated thread only redicated to checking if it's time
> > to print "hello"? there is no shared ressources, since i use a
> > database call, that will post a message only at a given time.
On Wed, Oct 10, 2012 at 11:52 PM, aliane abdelouahab <
alabdeloua...@gmail.com> wrote:
> then i must use a special thread for listening to time and waiting
> till the 18:00 gets? and do i receivre a confirmatio that the
> operation has done correctly? because if i automate it, imagine that
> at 17:59 there is a bug on the machine, and it will restarts at
> 18:01 !!!!
No threads. What about this (pseudocode):
add_timeout(datetime("when you want your operation to kick in") -
datetime.now(), operation)
> > I think the timeouts section it's what you're looking for...
> > Regards,
> > Jean
> > On Wed, Oct 10, 2012 at 4:02 PM, aliane abdelouahab <
> alabdeloua...@gmail.com
> > > wrote:
> > > hi,
> > > sorry for this queston ;)
> > > here is the code:
> > > if time = 18:00 pm, then print "hello"
> > > so i guess, verifying time in a regular way, will consume ressources?
> > > so do i use a separated thread only redicated to checking if it's time
> > > to print "hello"? there is no shared ressources, since i use a
> > > database call, that will post a message only at a given time.
> On Wed, Oct 10, 2012 at 11:52 PM, aliane abdelouahab <
> alabdeloua...@gmail.com> wrote:
> > then i must use a special thread for listening to time and waiting
> > till the 18:00 gets? and do i receivre a confirmatio that the
> > operation has done correctly? because if i automate it, imagine that
> > at 17:59 there is a bug on the machine, and it will restarts at
> > 18:01 !!!!
> No threads. What about this (pseudocode):
> add_timeout(datetime("when you want your operation to kick in") -
> datetime.now(), operation)
> L.
> > On 10 oct, 23:41, Jean Chassoul <chass...@gmail.com> wrote:
> > > Hi,
> > > I think the timeouts section it's what you're looking for...
> > > Regards,
> > > Jean
> > > On Wed, Oct 10, 2012 at 4:02 PM, aliane abdelouahab <
> > alabdeloua...@gmail.com
> > > > wrote:
> > > > hi,
> > > > sorry for this queston ;)
> > > > here is the code:
> > > > if time = 18:00 pm, then print "hello"
> > > > so i guess, verifying time in a regular way, will consume ressources?
> > > > so do i use a separated thread only redicated to checking if it's time
> > > > to print "hello"? there is no shared ressources, since i use a
> > > > database call, that will post a message only at a given time.
On Thursday, October 11, 2012 6:58:01 PM UTC+8, aliane abdelouahab wrote:
> mmmmmmmmmm, it seems to be useful, but to be honest, i dident > understand... am a beginner and my mind works with blueprints (def > foo: print bar ).
> On 11 oct, 09:45, Lorenzo Bolla <lbo...@gmail.com> wrote: > > On Wed, Oct 10, 2012 at 11:52 PM, aliane abdelouahab <
> > alabdeloua...@gmail.com> wrote: > > > then i must use a special thread for listening to time and waiting > > > till the 18:00 gets? and do i receivre a confirmatio that the > > > operation has done correctly? because if i automate it, imagine that > > > at 17:59 there is a bug on the machine, and it will restarts at > > > 18:01 !!!!
> > No threads. What about this (pseudocode):
> > add_timeout(datetime("when you want your operation to kick in") - > > datetime.now(), operation)
> > L.
> > > On 10 oct, 23:41, Jean Chassoul <chass...@gmail.com> wrote: > > > > Hi,
> > > > I think the timeouts section it's what you're looking for...
> > > > Regards, > > > > Jean
> > > > On Wed, Oct 10, 2012 at 4:02 PM, aliane abdelouahab < > > > alabdeloua...@gmail.com
> > > > > wrote: > > > > > hi, > > > > > sorry for this queston ;) > > > > > here is the code:
> > > > > if time = 18:00 pm, then print "hello"
> > > > > so i guess, verifying time in a regular way, will consume > ressources? > > > > > so do i use a separated thread only redicated to checking if it's > time > > > > > to print "hello"? there is no shared ressources, since i use a > > > > > database call, that will post a message only at a given time.
> IOLoop.instance().add_timeout( Time you want to time out in datetime type. )
> On Thursday, October 11, 2012 6:58:01 PM UTC+8, aliane abdelouahab wrote:
> > mmmmmmmmmm, it seems to be useful, but to be honest, i dident
> > understand... am a beginner and my mind works with blueprints (def
> > foo: print bar ).
> > On 11 oct, 09:45, Lorenzo Bolla <lbo...@gmail.com> wrote:
> > > On Wed, Oct 10, 2012 at 11:52 PM, aliane abdelouahab <
> > > alabdeloua...@gmail.com> wrote:
> > > > then i must use a special thread for listening to time and waiting
> > > > till the 18:00 gets? and do i receivre a confirmatio that the
> > > > operation has done correctly? because if i automate it, imagine that
> > > > at 17:59 there is a bug on the machine, and it will restarts at
> > > > 18:01 !!!!
> > > No threads. What about this (pseudocode):
> > > add_timeout(datetime("when you want your operation to kick in") -
> > > datetime.now(), operation)
> > > L.
> > > > On 10 oct, 23:41, Jean Chassoul <chass...@gmail.com> wrote:
> > > > > Hi,
> > > > > I think the timeouts section it's what you're looking for...
> > > > > Regards,
> > > > > Jean
> > > > > On Wed, Oct 10, 2012 at 4:02 PM, aliane abdelouahab <
> > > > alabdeloua...@gmail.com
> > > > > > wrote:
> > > > > > hi,
> > > > > > sorry for this queston ;)
> > > > > > here is the code:
> > > > > > if time = 18:00 pm, then print "hello"
> > > > > > so i guess, verifying time in a regular way, will consume
> > ressources?
> > > > > > so do i use a separated thread only redicated to checking if it's
> > time
> > > > > > to print "hello"? there is no shared ressources, since i use a
> > > > > > database call, that will post a message only at a given time.
Timeouts are stored in a heap (self._timeouts). At each IOLoop iteration,
the most urgent timeout is checked out from the heap and executed (if its
time has come).
> Timeouts are stored in a heap (self._timeouts). At each IOLoop iteration,
> the most urgent timeout is checked out from the heap and executed (if its
> time has come).