Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test case or recv-evt problem #21

Open
mflatt opened this issue Dec 8, 2020 · 0 comments
Open

test case or recv-evt problem #21

mflatt opened this issue Dec 8, 2020 · 0 comments

Comments

@mflatt
Copy link

mflatt commented Dec 8, 2020

This test is failing on Racket CS (racket/racket#3457):

 (test-case
    "An evt-set syncs to the list of results of evts."
    (define πs (for/list ([i 10]) (process (λ () (emit i)))))
    (define evt (apply evt-set (map recv-evt πs)))
    (check equal? (sync evt) '(0 1 2 3 4 5 6 7 8 9)))

It looks like recv-evt uses the same channel to receive all events in a given process. So, even if the third recv-evt becomes ready, it doesn't necessarily receive a value from the third element of πs; it might pick up the value from the fifth element of πs, while some other recv-evt gets the result of the third element of πs. Put another way, changing recv-evt to use (make-exchanger) in place of (process-rx (current-process)) causes the test to pass — but I don't know whether it's rect-evt or the test that should be considered wrong, or if I'm missing something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant