Re: [m-users.] Calling exit(3) from a foreign predicate
Julien Fischer <[email protected]> Thu, 25 Jan 2024 16:05:44 +1100 (AEDT)
| Newsgroups | gmane.comp.lang.mercury.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, On Wed, 24 Jan 2024, Volker Wysk wrote: > Calling exit(3), without calling mercury_runtime_terminate() before, works. > All thread are terminated and the program exits. It's only > mercury_runtime_terminate() that blocks. I've read somewhere that it waits > for all threads to terminate. Is there another function which doesn't? I'd > like to properly shut down the Mercury runtime, if possible. Yes, Mercury programs do not terminate until all threads created by calls to spawn/3 terminate; mercury_runtime_terminate() will block until this occurs. As it stands at the moment, you will need to arrange for any remaining threads to terminate. Julien. _______________________________________________ users mailing list [email protected] https://lists.mercurylang.org/listinfo/users