Nokacer
2007-Sep-23 10:36 UTC
Does prototype get rid of PeriodicalExecuter once it is stop()?
Hello, in my app the user can click "start" to ask for regular refreshments of the data, and can also click "stop" to stop this refreshments (and then he can click "start" again to restart the process). im just wondering that , if he keeps starting and stopping, that is creating new PeriodicalExecuters and stoping them, if there will be any memory issues, does prototype gets rid of the PeriodicalExecuter Instances once they are stopped? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Nicolás Sanguinetti
2007-Sep-23 18:04 UTC
Re: Does prototype get rid of PeriodicalExecuter once it is stop()?
You don''t have to worry, it''s only one instance :) The PeriodicalExecuter does a setInterval and on each call checks if it''s stopped or not, in which case calls your method. It doesn''t spawn new PeriodicalExecuters or anything. Best, Nicolas On 9/23/07, Nokacer <iuri.matias-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello, > > in my app the user can click "start" to ask for regular refreshments > of the data, and can also click "stop" to stop this refreshments (and > then he can click "start" again to restart the process). im just > wondering that , if he keeps starting and stopping, that is creating > new PeriodicalExecuters and stoping them, if there will be any memory > issues, does prototype gets rid of the PeriodicalExecuter Instances > once they are stopped? > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Reasonably Related Threads
- Managing PeriodicalExecuters in an Ajax app. How?
- PeriodicalExecuter passing variables to the callback function
- prototype PeriodicalExecuter pause/restart patch
- Does Ajax.PeriodicalUpdater have a shield against multiple parallel executions?
- PeriodicalExecuter stops when form is submitted in Safari 3