core-foundation.run-loop: remove reset on every iteration.

db4
John Benediktsson 2012-08-01 16:59:33 -07:00
parent a056a81307
commit 7d8d6cdd51
2 changed files with 2 additions and 2 deletions

View File

@ -126,7 +126,6 @@ PRIVATE>
60 timer-callback <CFTimer> add-timer-to-run-loop ;
: run-one-iteration ( nanos -- handled? )
reset-run-loop
CFRunLoopDefaultMode
swap [ 1,000,000,000 / ] [ 300 ] if*
t CFRunLoopRunInMode kCFRunLoopRunHandledSource = ;

View File

@ -12,8 +12,9 @@ TUPLE: run-loop-mx kqueue-mx ;
: file-descriptor-callback ( -- callback )
void { CFFileDescriptorRef CFOptionFlags void* }
cdecl [
3drop
2drop
0 mx get-global kqueue-mx>> wait-for-events
enable-all-callbacks
yield
] alien-callback ;