meta/pkg-build/thread: fix test
Add synchronization so that the enumerated interleavings cover all of the ones that should be possible. Using `(sync (system-idle-evt))` as a barrier works as long as the implementation of the library being tested doesn't itself use `(sync (system-idle-evt))`. That seems like a safe-enough assumption for a test.
This commit is contained in:
parent
4c8084e5d8
commit
59da3bd83e
|
@ -108,7 +108,7 @@
|
|||
(printf "hi\n")
|
||||
(eprintf "bye\n")
|
||||
(flush-chunk-output)
|
||||
(sleep)
|
||||
(sync (system-idle-evt))
|
||||
(printf "HI\n")
|
||||
(eprintf "BYE\n"))))
|
||||
(define t2 (thread/chunk-output
|
||||
|
@ -116,7 +116,7 @@
|
|||
(printf "hola\n")
|
||||
(eprintf "adios\n")
|
||||
(flush-chunk-output)
|
||||
(sleep)
|
||||
(sync (system-idle-evt))
|
||||
(printf "HOLA\n")
|
||||
(eprintf "ADIOS\n"))))
|
||||
(wait-chunk-output))
|
||||
|
|
Loading…
Reference in New Issue
Block a user