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.
10 lines
212 B
Text
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
|
|
|