sig
type ('a, 'watching) t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
('watching -> Sexplib.Sexp.t) ->
('a, 'watching) File_descr_watcher.t -> Sexplib.Sexp.t
val invariant : ('a, 'b) File_descr_watcher.t -> unit
val create : num_file_descrs:int -> ('a, 'b) File_descr_watcher.t
module State :
sig
type 'a t = Watching of 'a | Stop_requested
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
'a File_descr_watcher.State.t -> Sexplib.Sexp.t
end
val state :
('a, 'watching) File_descr_watcher.t ->
Core.Std.Unix.File_descr.t ->
Read_write.Key.t -> 'watching File_descr_watcher.State.t option
val iter :
('a, 'watching) File_descr_watcher.t ->
f:(Read_write.Key.t -> 'watching File_descr_watcher.State.t -> 'a -> unit) ->
unit
val request_start_watching :
('a, 'watching) File_descr_watcher.t ->
Core.Std.Unix.File_descr.t ->
'a -> 'watching -> Read_write.Key.t -> [ `Already_watching | `Ok ]
val request_stop_watching :
('a, 'watching) File_descr_watcher.t ->
Core.Std.Unix.File_descr.t ->
Read_write.Key.t -> [ `Ok of 'watching | `Was_not_watching ]
type 'a pre
val pre_check : ('a, 'b) File_descr_watcher.t -> 'a File_descr_watcher.pre
type 'a check_result
val thread_safe_check :
('a, 'b) File_descr_watcher.t ->
'a File_descr_watcher.pre ->
timeout:float -> 'a File_descr_watcher.check_result
type ('a, 'watching) post = {
ready : ('a * 'watching) list;
bad : ('a * 'watching) list;
no_longer_watching : 'a list;
}
val post_check :
('a, 'watching) File_descr_watcher.t ->
'a File_descr_watcher.check_result ->
[ `Ok of ('a, 'watching) File_descr_watcher.post Read_write.t | `Retry ]
val ounit_tests : unit -> OUnit.test
end