unsafe-poller: fix result handling

Closes #2754
This commit is contained in:
Matthew Flatt 2019-07-21 17:52:13 -06:00
parent 91f5ec3c9b
commit fa754ee333
2 changed files with 10 additions and 1 deletions

View File

@ -1005,6 +1005,15 @@
(values #f self)])))) (values #f self)]))))
(test #t sync (p))) (test #t sync (p)))
(let ()
(struct not-ever-evt ()
#:property prop:evt
(unsafe-poller
(lambda (self wakeups)
(printf "~s\n" wakeups)
(values #f never-evt))))
(test #f sync/timeout 0 (not-ever-evt)))
;; ---------------------------------------- ;; ----------------------------------------
;; Garbage collection ;; Garbage collection

View File

@ -1661,7 +1661,7 @@ static int evt_struct_is_ready(Scheme_Object *o, Scheme_Schedule_Info *sinfo)
v = scheme_make_closed_prim_w_arity(return_wrapped, (void *)v, "wrapper", 1, 1); v = scheme_make_closed_prim_w_arity(return_wrapped, (void *)v, "wrapper", 1, 1);
} }
scheme_set_sync_target(sinfo, v, (done ? v : NULL), NULL, 0, 0, NULL); scheme_set_sync_target(sinfo, v, (done ? v : NULL), NULL, 0, 0, NULL);
return 1; return done;
} }
} }