Rev 0.3.1: a libev-based event framework, now with better filesystem monitoring

rev 0.3.1 is largely a maintenance/bugfix release, but it comes with a
feature: configurable filesystem polling intervals.

The previous version introduced Rev::StatWatcher, a simple observer that
notifies you if stat() for a given path changes. Thanks to rev’s
libev-based core, rev can do this while monitoring for events on any
Ruby IO
object, and all in a single thread. On Linux, filesystem monitoring
inotify, a high-performance interface which receives event notifications
directly from the kernel. On all other platforms, libev monitors the
filesystem using stat() polling.

The previous version did not allow you to configure this polling
and used a “default” of approximately 5 seconds intended to maximize
performace. This is unacceptable in some cases where you want
monitoring closer to realtime.

0.3.1 lets you create new filesystem watchers with a prespecified
interval:"./path/to/interesting/file", 0.5)

This will check the status of the given path every 0.5 seconds rather
every 5 seconds. Values below 0.1 are not particularly meaningful. On
Linux the polling interval is ignored and events are received as soon as
inotify reports them.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs