update run-loop multiplexer
parent
adcb0df0c4
commit
dc1eefbcc9
|
@ -121,8 +121,8 @@ PRIVATE>
|
||||||
: init-thread-timer ( -- )
|
: init-thread-timer ( -- )
|
||||||
timer-callback <CFTimer> add-timer-to-run-loop ;
|
timer-callback <CFTimer> add-timer-to-run-loop ;
|
||||||
|
|
||||||
: run-one-iteration ( us -- handled? )
|
: run-one-iteration ( nanos -- handled? )
|
||||||
reset-run-loop
|
reset-run-loop
|
||||||
CFRunLoopDefaultMode
|
CFRunLoopDefaultMode
|
||||||
swap [ microseconds ] [ 5 minutes ] if* >CFTimeInterval
|
swap [ nanoseconds ] [ 5 minutes ] if* >CFTimeInterval
|
||||||
t CFRunLoopRunInMode kCFRunLoopRunHandledSource = ;
|
t CFRunLoopRunInMode kCFRunLoopRunHandledSource = ;
|
||||||
|
|
|
@ -30,5 +30,5 @@ M: run-loop-mx add-output-callback kqueue-mx>> add-output-callback ;
|
||||||
M: run-loop-mx remove-input-callbacks kqueue-mx>> remove-input-callbacks ;
|
M: run-loop-mx remove-input-callbacks kqueue-mx>> remove-input-callbacks ;
|
||||||
M: run-loop-mx remove-output-callbacks kqueue-mx>> remove-output-callbacks ;
|
M: run-loop-mx remove-output-callbacks kqueue-mx>> remove-output-callbacks ;
|
||||||
|
|
||||||
M: run-loop-mx wait-for-events ( us mx -- )
|
M: run-loop-mx wait-for-events ( nanos mx -- )
|
||||||
swap run-one-iteration [ 0 swap wait-for-events ] [ drop ] if ;
|
swap run-one-iteration [ 0 swap wait-for-events ] [ drop ] if ;
|
||||||
|
|
Loading…
Reference in New Issue