mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
added threadKilledTypeLinkTest to common tests on Share
This commit is contained in:
parent
5bd433732d
commit
3ba74632f2
@ -1,15 +0,0 @@
|
||||
-- TODO Move this to concurrency-tests once the JIT supports typeLinks
|
||||
threadKilledTypeLinkTest = Tests.main do
|
||||
ref = IO.ref None
|
||||
t = fork do
|
||||
match catchAll do sleep_ (400 * millis) with
|
||||
Left (Failure f _ _) -> unsafeRun! do Ref.write ref (Some f)
|
||||
_ -> ()
|
||||
sleep_ (200 * millis)
|
||||
kill_ t
|
||||
sleep_ (300 * millis)
|
||||
v = Ref.read ref
|
||||
expected = Some (typeLink ThreadKilledFailure)
|
||||
checkEqual "Thread killed, finalisers with typeLink" v expected
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user