Nathaniel Gray [Friday 18 August 2006] :
> Now of course this could all be done at the ocaml level, but
> wouldn't it be nicer to do the elegant thing in the first place
> instead of cleaning up the mess afterwards? ;^)
Erm, doing things on the C side isn't especially "elegant",
sorry. It's way more error-prone, more complicated to compile/link
against, and in your case it's not even portable (your version is
Unix-only).
Just write your select2 using an intermediate Hashtbl: it probably
won't be much slower (unless you have hundreds of fd maybe).
--
Olivier