Browse thread
[Caml-list] Library using blocking Unix functions
- Nicolas GEORGE
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Nicolas GEORGE <nicolas.george@e...> |
| Subject: | [Caml-list] Library using blocking Unix functions |
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