sig
  type ('a, 'watching) t
  val sexp_of_t :
    ('-> 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 '| Stop_requested
      val sexp_of_t :
        ('-> Sexplib.Sexp.t) ->
        '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 -> '-> unit) ->
    unit
  val request_start_watching :
    ('a, 'watching) File_descr_watcher.t ->
    Core.Std.Unix.File_descr.t ->
    '-> '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 -> 'File_descr_watcher.pre
  type 'a check_result
  val thread_safe_check :
    ('a, 'b) File_descr_watcher.t ->
    'File_descr_watcher.pre ->
    timeout:float -> '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 ->
    'File_descr_watcher.check_result ->
    [ `Ok of ('a, 'watching) File_descr_watcher.post Read_write.t | `Retry ]
  val ounit_tests : unit -> OUnit.test
end