factor/extra/vocabs/monitor/monitor.factor

19 lines
577 B
Factor
Raw Normal View History

2008-02-12 13:19:25 -05:00
USING: threads io.files io.monitors init kernel tools.browser
continuations ;
2008-02-05 19:55:10 -05:00
IN: vocabs.monitor
! Use file system change monitoring to flush the tags/authors
! cache
: update-thread ( monitor -- )
dup next-change 2drop reset-cache update-thread ;
: start-update-thread
2008-02-12 13:19:25 -05:00
#! Silently ignore errors during monitor creation since
#! monitors are not supported on all platforms.
2008-02-05 19:55:10 -05:00
[
2008-02-12 13:19:25 -05:00
[ "" resource-path t <monitor> ] [ drop f ] recover
[ update-thread ] when*
2008-02-05 19:55:10 -05:00
] in-thread ;
[ start-update-thread ] "tools.browser" add-init-hook