You set up an infinite loop in a separate thread. Every five seconds or so, you check the file modification times - if they are recent then you know that the file has changed. So it is a polling approach, rather than a notification based approach.
Take a look at lib/merb-core/bootloader.rb around line 677 for the TimedExecuter and the reload method in the same file. Cheers, Roland On 17 Sep, 18:44, Praveen <[EMAIL PROTECTED]> wrote: > Hi All > This is not strictly related to Merb but since Merb (and Rails) seem > to use it effectively, I'm assuming it's ok to ask this question > anyway...How does Merb detect the file changes (in development mode) > and automatically reloads those files? Is it a mechanism built into > Ruby? I'd like to use the same feature in another Ruby App server I'm > developing, if possible. > > ThankYou. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
