diff --git a/extra/io/unix/macosx/macosx.factor b/extra/io/unix/macosx/macosx.factor index 136035991c..bd48fbc9b5 100644 --- a/extra/io/unix/macosx/macosx.factor +++ b/extra/io/unix/macosx/macosx.factor @@ -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 drop @@ -25,4 +25,3 @@ M: macosx-io M: macosx-monitor dispose dup simple-monitor-handle dispose delegate dispose ; - diff --git a/extra/vocabs/monitor/monitor.factor b/extra/vocabs/monitor/monitor.factor index 24aa8b1d99..e5b9a8c3a1 100755 --- a/extra/vocabs/monitor/monitor.factor +++ b/extra/vocabs/monitor/monitor.factor @@ -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 update-thread + [ "" resource-path t ] [ drop f ] recover + [ update-thread ] when* ] in-thread ; [ start-update-thread ] "tools.browser" add-init-hook