Mac OS X monitors load

db4
Slava Pestov 2008-02-12 02:33:06 -06:00
parent ff6f72412d
commit e4426eb01a
4 changed files with 9 additions and 8 deletions

View File

@ -1,8 +1,8 @@
! Copyright (C) 2008 Slava Pestov ! Copyright (C) 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.syntax kernel math sequences USING: alien alien.c-types alien.syntax kernel math sequences
namespaces assocs init continuations ; namespaces assocs init continuations core-foundation ;
IN: core-foundation IN: core-foundation.fsevents
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
! FSEventStream API, Leopard only ! ! FSEventStream API, Leopard only !

View File

@ -1,7 +1,7 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: io.backend kernel continuations namespaces sequences USING: io.backend kernel continuations namespaces sequences
assocs hashtables sorting arrays ; assocs hashtables sorting arrays threads ;
IN: io.monitors IN: io.monitors
<PRIVATE <PRIVATE
@ -36,7 +36,7 @@ TUPLE: simple-monitor handle callback ;
: <simple-monitor> ( handle -- simple-monitor ) : <simple-monitor> ( handle -- simple-monitor )
f (monitor) { f (monitor) {
set-simple-monitor-wd set-simple-monitor-handle
set-delegate set-delegate
} simple-monitor construct ; } simple-monitor construct ;
@ -44,8 +44,8 @@ TUPLE: simple-monitor handle callback ;
>r <simple-monitor> r> construct-delegate ; inline >r <simple-monitor> r> construct-delegate ; inline
: notify-callback ( simple-monitor -- ) : notify-callback ( simple-monitor -- )
dup linux-monitor-callback dup simple-monitor-callback
f rot set-linux-monitor-callback f rot set-simple-monitor-callback
[ schedule-thread ] when* ; [ schedule-thread ] when* ;
M: simple-monitor fill-queue ( monitor -- ) M: simple-monitor fill-queue ( monitor -- )

View File

@ -1,6 +1,7 @@
IN: io.unix.macosx IN: io.unix.macosx
USING: io.unix.bsd io.backend io.monitors io.monitors.private USING: io.unix.bsd io.backend io.monitors io.monitors.private
continuations kernel core-foundation.fsevents ; continuations kernel core-foundation.fsevents sequences
namespaces arrays ;
TUPLE: macosx-io ; TUPLE: macosx-io ;

View File

@ -1,6 +1,6 @@
USING: io.unix.backend io.unix.files io.unix.sockets io.timeouts USING: io.unix.backend io.unix.files io.unix.sockets io.timeouts
io.unix.launcher io.unix.mmap io.backend combinators namespaces io.unix.launcher io.unix.mmap io.backend combinators namespaces
system vocabs.loader ; system vocabs.loader sequences ;
"io.unix." os append require "io.unix." os append require