From: Matej Kosik <kosik@fiit.stuba.sk>
To: caml-list@inria.fr
Subject: [Caml-list] Thread.exit
Date: Sat, 17 Dec 2011 13:30:56 +0000 [thread overview]
Message-ID: <4EEC9990.3000102@fiit.stuba.sk> (raw)
Hello,
I use the threads library.
I would like to ask if
Thread.exit
must have the following type:
unit -> unit
instead of:
unit -> 'a
i.e. the same as the type of Pervasives.exit.
In my code:
let bits = try receive ()
with Channel.End -> close ();
Thread.exit ();
exit 0
in
I must make a bogus call "exit 0" empty to make the type-checker happy.
If "Thread.exit" had the same type as "Pervasives.empty", it would not
be necessary.
It is not a big problem, but I think this is unnecessary constraint and
if removed, I could simply write:
let bits = try receive ()
with Channel.End -> close ();
Thread.exit ()
in
(i.e. without confusing bogus calls)
Maybe I am just too sensitive, but I would still be interested in these
small improvements, if they make sense.
Regards,
next reply other threads:[~2011-12-17 13:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-17 13:30 Matej Kosik [this message]
2011-12-17 20:37 ` oliver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EEC9990.3000102@fiit.stuba.sk \
--to=kosik@fiit.stuba.sk \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).