Skip to content

Commit

Permalink
Merge pull request #341 from samoht/format-comments
Browse files Browse the repository at this point in the history
Format comments
  • Loading branch information
samoht authored Nov 29, 2020
2 parents 965df68 + ef91c5b commit b57f635
Show file tree
Hide file tree
Showing 9 changed files with 189 additions and 190 deletions.
1 change: 0 additions & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ nested-match=align
sequence-style=separator
break-before-in=auto
if-then-else=keyword-first
parse-docstrings=false
16 changes: 7 additions & 9 deletions src/async/conduit_async.mli
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,16 @@ val serve :
service:('cfg, 't, 'v) service ->
'cfg ->
unit Async.Condition.t * (unit -> unit Async.Deferred.t)
(** [serve ~handler ~service cfg] creates an usual infinite [service]
loop from the given configuration ['cfg]. It returns the {i promise}
to launch the loop and a condition variable to stop the loop.
(** [serve ~handler ~service cfg] creates an usual infinite [service] loop from
the given configuration ['cfg]. It returns the {i promise} to launch the
loop and a condition variable to stop the loop.
{[
let stop, loop = serve
~handler ~service:TCP.service cfg in
Async_unix.Signal.handle [ Core.Signal.int ]
~f:(fun _sig -> Async.Condition.broadcast stop ()) ;
let stop, loop = serve ~handler ~service:TCP.service cfg in
Async_unix.Signal.handle [ Core.Signal.int ] ~f:(fun _sig ->
Async.Condition.broadcast stop ()) ;
loop ()
]}
*)
]} *)

val reader_and_writer_of_flow :
flow -> (Async.Reader.t * Async.Writer.t) Async.Deferred.t
Expand Down
4 changes: 2 additions & 2 deletions src/core/conduit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ module Log = (val Logs.src_log src : Logs.LOG)
type ('a, 'b, 'c) thd =
| Thd : 'b -> ('a, 'b, 'c) thd
(** XXX(dinosaure): we must define [(_, _, _) thd] to be able to keep some
existential types (eg. ['cfg] and ['flow] when we use [('cfg, 't, 'flow)
service]) but still to use only on (eg. ['t]).
existential types (eg. ['cfg] and ['flow] when we use
[('cfg, 't, 'flow) service]) but still to use only on (eg. ['t]).
We add [warning "-37"] to be able to compile the project. *)

Expand Down
Loading

0 comments on commit b57f635

Please sign in to comment.