Forgot to invoke callback

db4
Slava Pestov 2008-02-12 12:19:25 -06:00
parent e4426eb01a
commit 5912cad83f
2 changed files with 9 additions and 6 deletions

View File

@ -12,9 +12,9 @@ T{ macosx-io } set-io-backend
TUPLE: macosx-monitor ;
: enqueue-notifications ( triples monitor -- )
monitor-queue [
[ first { +modify-file+ } swap changed-file ] each
] bind ;
tuck monitor-queue
[ [ first { +modify-file+ } swap changed-file ] each ] bind
notify-callback ;
M: macosx-io <monitor>
drop
@ -25,4 +25,3 @@ M: macosx-io <monitor>
M: macosx-monitor dispose
dup simple-monitor-handle dispose delegate dispose ;

View File

@ -1,4 +1,5 @@
USING: threads io.files io.monitors init kernel tools.browser ;
USING: threads io.files io.monitors init kernel tools.browser
continuations ;
IN: vocabs.monitor
! Use file system change monitoring to flush the tags/authors
@ -7,8 +8,11 @@ IN: vocabs.monitor
dup next-change 2drop reset-cache update-thread ;
: start-update-thread
#! Silently ignore errors during monitor creation since
#! monitors are not supported on all platforms.
[
"" resource-path t <monitor> update-thread
[ "" resource-path t <monitor> ] [ drop f ] recover
[ update-thread ] when*
] in-thread ;
[ start-update-thread ] "tools.browser" add-init-hook