added threadKilledTypeLinkTest to common tests on Share

This commit is contained in:
Arya Irani 2024-04-04 15:19:16 -06:00
parent 5bd433732d
commit 3ba74632f2

View File

@ -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