interrupt the after method?

  • Thread starter =?ISO-8859-1?Q?philip_st=F6ver?=
  • Start date
?

=?ISO-8859-1?Q?philip_st=F6ver?=

Hi,

I got something like

after(2000, myMethod)

Is there any way, to stop the after method from calling myMethod?
My problem is, that myMethod might be called directly (within 2000 ms)
in which case I don't want it to be called again through the after method.

Thanks in advance
philip
 
?

=?ISO-8859-1?Q?philip_st=F6ver?=

philip said:
I got something like

after(2000, myMethod)

Is there any way, to stop the after method from calling myMethod?
My problem is, that myMethod might be called directly (within 2000 ms)
in which case I don't want it to be called again through the after method.

Problem solved. after_cancel(id) was what I've been looking for.

philip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top