lean4-htt/tests/compiler/wait_dedicated.lean
Henrik Böving 8e9da7a1bc
feat: wait on dedicated tasks after main is finished (#7958)
This PR ensures that after `main` is finished we still wait on dedicated
tasks instead of exiting forcefully. If users wish to violently kill
their dedicated tasks at the end of main instead they can run
`IO.Process.exit` at the end of `main` instead.
2025-04-14 11:53:54 +00:00

10 lines
212 B
Text

/- Ensure we wait on dedicated tasks even after main is finished -/
def stuff : IO Unit := do
IO.sleep 100
IO.println "Hi there"
def main : IO Unit := do
discard <| IO.asTask (prio := .dedicated) stuff