Skip to content

test case or recv-evt problem #21

@mflatt

Description

@mflatt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions