caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Library using blocking Unix functions
@ 2001-06-24 19:27 Nicolas GEORGE
  2001-06-24 21:08 ` Patrick M Doane
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas GEORGE @ 2001-06-24 19:27 UTC (permalink / raw)
  To: Caml mailing list

I am trying to write a small library that needs blocking functions. And I
have a problem with these: they exist in Unix and ThreadUnix. This is not a
problem for a self-contained application, where one know if it is threaded
or not (even there, switching from non-threaded to threaded may cause
errors). But this means that the same library can not be used in both
cases.

One solution could be for _every_ module in the library to be a functor in
term of an ThreadUnix-like module, but I find that hevay and inelegant.

Something more elegant would be, I think, to have a unique module, let us
say BlockingUnix, with two implementations, one in the standard directory,
and another in the directory with the threaded library, that have exactly
the same interface (the .cmi should have the same md5 sum).

I wonder what people here think about this.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-06-25  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-24 19:27 [Caml-list] Library using blocking Unix functions Nicolas GEORGE
2001-06-24 21:08 ` Patrick M Doane
2001-06-24 21:16   ` Nicolas George
2001-06-25  7:17   ` Xavier Leroy

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).