Core.Commandwith additional Async functions.
module type of
Core.Std.Commandwith type t = Core.Std.Command.t with module Spec = Core.Std.Command.Spec
val async_basic :
summary:string -> ?readme:(unit -> string) -> ('a, unit -> unit Import.Deferred.t) Spec.t -> 'a -> t
async_basicis exactly the same as
Core.Command.basic, except that the function it wraps returns
unit Deferred.t, instead of
async_basicwill also start the Async scheduler before the wrapped function is run, and will stop the scheduler when the wrapped function returns.
Arg_type.tthat uses auto-completion and uses Async to compute the possible completions, one should use
Arg_type.create ~complete of_string
complete wraps its Async operations in
complete function is only called when the executable is auto-completing,
not for ordinary execution. This improves performance, and also means that the Async
scheduler isn't started for ordinary execution of the command, which makes it possible
for the command to daemonize (which requires the scheduler to not have been started).