Module Async_unix__.Writer0

module Core_unix = Core.Unix
module Unix = Async_unix__.Unix_syscalls
module IOVec = Core.Unix.IOVec
module Id : sig ... end
val io_stats : Async_unix.Io_stats.t
val debug : bool
module Line_ending : sig ... end
module Check_buffer_age' : sig ... end
module Open_flags = Unix.Open_flags
type open_flags = (Open_flags.t, exn) Core.Result.t
val sexp_of_open_flags : open_flags ‑> Base.Sexp.t
module Backing_out_channel : sig ... end
module Scheduled : sig ... end
type t = {
id : Id.t;
mutable fd : Async_unix.Fd.t;
monitor : Async_unix__.Import.Monitor.t;
inner_monitor : Async_unix__.Import.Monitor.t;
mutable background_writer_state : [ `Running | `Not_running | `Stopped_permanently ];
background_writer_stopped : unit Async_unix__.Import.Ivar.t;
syscall : [ `Per_cycle | `Periodic of Core.Time.Span.t ];
mutable bytes_received : Core.Int63.t;
mutable bytes_written : Core.Int63.t;
scheduled : Scheduled.t Core.sexp_opaque;
mutable scheduled_bytes : int;
mutable buf : Core.Bigstring.t Core.sexp_opaque;
mutable scheduled_back : int;
mutable back : int;
flushes : (Core.Time_ns.t Async_unix__.Import.Ivar.t * Core.Int63.t) Core.Queue.t Core.sexp_opaque;
mutable close_state : [ `Open | `Closed_and_flushing | `Closed ];
close_finished : unit Async_unix__.Import.Ivar.t;
close_started : unit Async_unix__.Import.Ivar.t;
producers_to_flush_at_close : (unit ‑> unit Async_unix__.Import.Deferred.t) Core.Bag.t;
mutable flush_at_shutdown_elt : t Core.sexp_opaque Core.Bag.Elt.t option;
mutable check_buffer_age : t Core.sexp_opaque Check_buffer_age'.t Core.Bag.Elt.t option;
consumer_left : unit Async_unix__.Import.Ivar.t;
mutable raise_when_consumer_leaves : bool;

(** default is true *)

open_flags : open_flags Async_unix__.Import.Deferred.t;
line_ending : Line_ending.t;
mutable backing_out_channel : Backing_out_channel.t option;
}
val backing_out_channel : t ‑> Backing_out_channel.t option
val set_backing_out_channel : t ‑> Backing_out_channel.t option ‑> unit
val line_ending : t ‑> Line_ending.t
val open_flags : t ‑> open_flags Async_unix__.Import.Deferred.t
val raise_when_consumer_leaves : t ‑> bool
val set_raise_when_consumer_leaves : t ‑> bool ‑> unit
val consumer_left : t ‑> unit Async_unix__.Import.Ivar.t
val check_buffer_age : t ‑> t Core.sexp_opaque Check_buffer_age'.t Core.Bag.Elt.t option
val set_check_buffer_age : t ‑> t Core.sexp_opaque Check_buffer_age'.t Core.Bag.Elt.t option ‑> unit
val flush_at_shutdown_elt : t ‑> t Core.sexp_opaque Core.Bag.Elt.t option
val set_flush_at_shutdown_elt : t ‑> t Core.sexp_opaque Core.Bag.Elt.t option ‑> unit
val producers_to_flush_at_close : t ‑> (unit ‑> unit Async_unix__.Import.Deferred.t) Core.Bag.t
val close_started : t ‑> unit Async_unix__.Import.Ivar.t
val close_finished : t ‑> unit Async_unix__.Import.Ivar.t
val close_state : t ‑> [ `Closed | `Closed_and_flushing | `Open ]
val set_close_state : t ‑> [ `Closed | `Closed_and_flushing | `Open ] ‑> unit
val flushes : t ‑> (Core.Time_ns.t Async_unix__.Import.Ivar.t * Core.Int63.t) Core.Queue.t Core.sexp_opaque
val back : t ‑> int
val set_back : t ‑> int ‑> unit
val scheduled_back : t ‑> int
val set_scheduled_back : t ‑> int ‑> unit
val buf : t ‑> Core.Bigstring.t Core.sexp_opaque
val set_buf : t ‑> Core.Bigstring.t Core.sexp_opaque ‑> unit
val scheduled_bytes : t ‑> int
val set_scheduled_bytes : t ‑> int ‑> unit
val scheduled : t ‑> Scheduled.t Core.sexp_opaque
val bytes_written : t ‑> Core.Int63.t
val set_bytes_written : t ‑> Core.Int63.t ‑> unit
val bytes_received : t ‑> Core.Int63.t
val set_bytes_received : t ‑> Core.Int63.t ‑> unit
val syscall : t ‑> [ `Per_cycle | `Periodic of Core.Time.Span.t ]
val background_writer_stopped : t ‑> unit Async_unix__.Import.Ivar.t
val background_writer_state : t ‑> [ `Not_running | `Running | `Stopped_permanently ]
val set_background_writer_state : t ‑> [ `Not_running | `Running | `Stopped_permanently ] ‑> unit
val inner_monitor : t ‑> Async_unix__.Import.Monitor.t
val monitor : t ‑> Async_unix__.Import.Monitor.t
val fd : t ‑> Async_unix.Fd.t
val set_fd : t ‑> Async_unix.Fd.t ‑> unit
val id : t ‑> Id.t
module Fields : sig ... end
val sexp_of_t : t ‑> Base.Sexp.t
type writer = t
val sexp_of_writer : writer ‑> Base.Sexp.t
val set_raise_when_consumer_leaves : t ‑> bool ‑> unit
val bytes_to_write : t ‑> int
val is_stopped_permanently : t ‑> bool
val invariant : t Core.sexp_opaque ‑> unit
module Check_buffer_age : sig ... end
val flushed_time_ns : t ‑> Core.Time_ns.t Async_kernel__Deferred.t
val flushed_time : t ‑> Core__.Import_time.Time.t Async_unix__.Import.Deferred.t
val flushed : t ‑> unit Async_kernel__Deferred.t
val set_synchronous_out_channel_internal : t ‑> Core.Out_channel.t ‑> unit
val set_synchronous_out_channel : t ‑> Core.Out_channel.t ‑> unit Async_kernel__Deferred.t
val clear_synchronous_out_channel : t ‑> unit
val with_synchronous_out_channel : t ‑> Core.Out_channel.t ‑> f:(unit ‑> 'a Async_kernel__Deferred.t) ‑> 'a Async_unix__.Import.Monitor.Deferred.t
val set_fd : t ‑> Async_unix.Fd.t ‑> unit Async_kernel__Deferred.t
val consumer_left : t ‑> unit Async_kernel__.Deferred0.t
val close_finished : t ‑> unit Async_kernel__.Deferred0.t
val close_started : t ‑> unit Async_kernel__.Deferred0.t
val is_closed : t ‑> bool
val is_open : t ‑> bool
val writers_to_flush_at_shutdown : t Core.Bag.t
val final_flush : ?⁠force:unit Async_unix__.Import.Deferred.t ‑> t ‑> unit Async_unix__.Import.Deferred.t
val close : ?⁠force_close:unit Async_unix__.Import.Deferred.t ‑> t ‑> unit Async_kernel__.Deferred0.t
val fill_flushes : t ‑> unit
val stop_permanently : t ‑> unit
val stopped_permanently : t ‑> unit Async_kernel__.Deferred0.t
val die : t ‑> Base.Sexp.t ‑> 'a
type buffer_age_limit = [
| `At_most of Core.Time.Span.t
| `Unlimited
]
val bin_shape_buffer_age_limit : Bin_prot.Shape.t
val bin_size_buffer_age_limit : [> `At_most of Core.Time.Span.t ] ‑> int
val bin_write_buffer_age_limit : Bin_prot.Common.buf ‑> pos:Bin_prot.Common.pos ‑> [< `At_most of Core.Time.Span.t | `Unlimited ] ‑> Bin_prot.Common.pos
val bin_writer_buffer_age_limit : [< `At_most of Core.Time.Span.t | `Unlimited At_most ] Bin_prot.Type_class.writer
val __bin_read_buffer_age_limit__ : Bin_prot.Common.buf ‑> pos_ref:Bin_prot.Common.pos_ref ‑> int ‑> [> `At_most of Core.Time.Span.t | `Unlimited ]
val bin_read_buffer_age_limit : Bin_prot.Common.buf ‑> pos_ref:Bin_prot.Common.pos_ref ‑> [> `At_most of Core.Time.Span.t | `Unlimited ]
val bin_reader_buffer_age_limit : [> `At_most of Core.Time.Span.t | `Unlimited ] Bin_prot.Type_class.reader
val bin_buffer_age_limit : [ `At_most of Core.Time.Span.t | `Unlimited ] Bin_prot.Type_class.t
val __buffer_age_limit_of_sexp__ : Base.Sexp.t ‑> buffer_age_limit
val buffer_age_limit_of_sexp : Base.Sexp.t ‑> buffer_age_limit
val sexp_of_buffer_age_limit : buffer_age_limit ‑> Base.Sexp.t
val create : ?⁠buf_len:Core_kernel__Int.t ‑> ?⁠syscall:[ `Per_cycle | `Periodic of Core.Time.Span.t ] ‑> ?⁠buffer_age_limit:[ `At_most of Core.Time.Span.t | `Unlimited ] ‑> ?⁠raise_when_consumer_leaves:bool ‑> ?⁠line_ending:Line_ending.t ‑> Async_unix.Fd.t ‑> t
val set_buffer_age_limit : writer ‑> [ `At_most of Core.Time.Span.t | `Unlimited ] ‑> unit
val of_out_channel : Core.Out_channel.t ‑> Async_unix.Fd.Kind.t ‑> t
val can_write : t ‑> bool
val ensure_can_write : t ‑> unit
val open_file : ?⁠append:bool ‑> ?⁠buf_len:Core_kernel__Int.t ‑> ?⁠syscall:[ `Per_cycle | `Periodic of Core.Time.Span.t ] ‑> ?⁠perm:Unix.file_perm ‑> ?⁠line_ending:Line_ending.t ‑> string ‑> t Async_kernel__Deferred.t
val with_close : t ‑> f:(unit ‑> 'a Async_unix__.Import.Monitor.Deferred.t) ‑> 'a Async_unix__.Import.Monitor.Deferred.t
val with_writer_exclusive : t ‑> (unit ‑> 'a Async_unix__.Import.Monitor.Deferred.t) ‑> 'a Async_kernel__Deferred.t
val with_file : ?⁠perm:Unix.file_perm ‑> ?⁠append:bool ‑> ?⁠exclusive:bool ‑> ?⁠line_ending:Line_ending.t ‑> string ‑> f:(t ‑> 'a Async_unix__.Import.Monitor.Deferred.t) ‑> 'a Async_kernel__Deferred.t
val got_bytes : t ‑> int ‑> unit
val add_iovec : t ‑> [ `Destroy | `Keep ] ‑> Core.Bigstring.t IOVec.t ‑> count_bytes_as_received:bool ‑> unit
val schedule_unscheduled : t ‑> [ `Destroy | `Keep ] ‑> unit
val dummy_iovec : IOVec.bigstring IOVec.t
val mk_iovecs : t ‑> IOVec.bigstring IOVec.t Core.Array.t * bool * int
val thread_io_cutoff : int
val is_running : [> `Running ] ‑> bool
val fd_closed : t ‑> unit
val start_write : t ‑> unit
val write_when_ready : t ‑> unit
val write_finished : t ‑> Core_kernel__Int.t ‑> unit
val maybe_start_writer : t ‑> unit
val give_buf : t ‑> Core_kernel__Int.t ‑> Core.Bigstring.t Core.sexp_opaque * int
val write_gen_internal : t ‑> 'a ‑> src_pos:int ‑> src_len:Core_kernel__Int.t ‑> allow_partial_write:bool ‑> blit_to_bigstring:('aCore.Bigstring.tCore.Blit.blit ‑> unit
val write_direct : t ‑> f:(Core.Bigstring.t Core.sexp_opaque ‑> pos:int ‑> len:int ‑> 'a * Core_kernel__Int.t) ‑> 'a option
val write_gen_unchecked : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> 'a ‑> blit_to_bigstring:('aCore.Bigstring.tCore.Blit.blit ‑> length:('a ‑> int) ‑> unit
val write_gen_whole_unchecked : t ‑> 'a ‑> blit_to_bigstring:('a ‑> Core.Bigstring.t ‑> pos:int ‑> unit) ‑> length:('a ‑> Core_kernel__Int.t) ‑> unit
val write_bytes : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> Core_kernel__.Import.bytes ‑> unit
val write : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> Core_kernel__.Import.string ‑> unit
val write_bigstring : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> Core.Bigstring.t ‑> unit
val write_iobuf : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> ([> Core__.Import.read ], 'aCore.Iobuf.t ‑> unit
val write_substring : t ‑> Core.Substring.t ‑> unit
val write_bigsubstring : t ‑> Core.Bigsubstring.t ‑> unit
val writef : t ‑> ('a, unit, string, unit) Pervasives.format4 ‑> 'a
val write_gen : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> 'a ‑> blit_to_bigstring:('aCore.Bigstring.tCore.Blit.blit ‑> length:('a ‑> int) ‑> unit
val write_gen_whole : t ‑> 'a ‑> blit_to_bigstring:('a ‑> Core.Bigstring.t ‑> pos:int ‑> unit) ‑> length:('a ‑> Core_kernel__Int.t) ‑> unit
val to_formatter : t ‑> Format.formatter
val write_char : t ‑> Core_kernel__.Import.char ‑> unit
val newline : ?⁠line_ending:Line_ending.t ‑> t ‑> unit
val write_line : ?⁠line_ending:Line_ending.t ‑> t ‑> Core_kernel__.Import.string ‑> unit
val write_byte : t ‑> Core_kernel.Int.t ‑> unit
module Terminate_with : sig ... end
val write_sexp_internal : terminate_with:Terminate_with.t ‑> ?⁠hum:bool ‑> t ‑> Core.Sexp.t ‑> unit
val write_sexp : ?⁠hum:bool ‑> ?⁠terminate_with:Terminate_with.t ‑> t ‑> Core.Sexp.t ‑> unit
val write_bin_prot : t ‑> 'a Bin_prot.Type_class.writer ‑> 'a ‑> unit
val write_bin_prot_no_size_header : t ‑> size:Core_kernel__Int.t ‑> (Core.Bigstring.t Core.sexp_opaque ‑> pos:int ‑> 'a ‑> int) ‑> 'a ‑> unit
val write_marshal : t ‑> flags:Marshal.extern_flags Core_kernel__.Import.list ‑> 'a ‑> unit
val send : t ‑> Core.String.t ‑> unit
val schedule_iovec : t ‑> Core.Bigstring.t IOVec.t ‑> unit
val schedule_iovecs : t ‑> Core.Bigstring.t IOVec.t Core.Queue.t ‑> unit
val schedule_bigstring : t ‑> ?⁠pos:int ‑> ?⁠len:int ‑> IOVec.bigstring ‑> unit
val schedule_bigsubstring : t ‑> Core.Bigsubstring.t ‑> unit
val schedule_iobuf_peek : t ‑> ?⁠pos:int ‑> ?⁠len:int ‑> ('a'bCore__Iobuf.t ‑> unit
val schedule_iobuf_consume : t ‑> ?⁠len:int ‑> ('aCore.Iobuf.seekCore.Iobuf.t ‑> unit Async_kernel__Deferred.t
val fsync : t ‑> unit Async_kernel__Deferred.t
val fdatasync : t ‑> unit Async_kernel__Deferred.t
val write_bin_prot : t ‑> 'a Bin_prot.Type_class.writer ‑> 'a ‑> unit
val send : t ‑> Core.String.t ‑> unit
val schedule_iovec : t ‑> Core.Bigstring.t IOVec.t ‑> unit
val schedule_iovecs : t ‑> Core.Bigstring.t IOVec.t Core.Queue.t ‑> unit
val schedule_bigstring : t ‑> ?⁠pos:int ‑> ?⁠len:int ‑> IOVec.bigstring ‑> unit
val schedule_bigsubstring : t ‑> Core.Bigsubstring.t ‑> unit
val schedule_iobuf_peek : t ‑> ?⁠pos:int ‑> ?⁠len:int ‑> ('a'bCore__Iobuf.t ‑> unit
val schedule_iobuf_consume : t ‑> ?⁠len:int ‑> ('aCore.Iobuf.seekCore.Iobuf.t ‑> unit Async_kernel__Deferred.t
val write_gen : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> 'a ‑> blit_to_bigstring:('aCore.Bigstring.tCore.Blit.blit ‑> length:('a ‑> int) ‑> unit
val write_bytes : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> Core_kernel__.Import.bytes ‑> unit
val write : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> Core_kernel__.Import.string ‑> unit
val write_line : ?⁠line_ending:Line_ending.t ‑> t ‑> Core_kernel__.Import.string ‑> unit
val writef : t ‑> ('a, unit, string, unit) Pervasives.format4 ‑> 'a
val write_marshal : t ‑> flags:Marshal.extern_flags Core_kernel__.Import.list ‑> 'a ‑> unit
val write_sexp : ?⁠hum:bool ‑> ?⁠terminate_with:Terminate_with.t ‑> t ‑> Core.Sexp.t ‑> unit
val write_iobuf : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> ([> Core__.Import.read ], 'aCore.Iobuf.t ‑> unit
val write_bigstring : ?⁠pos:int ‑> ?⁠len:int ‑> t ‑> Core.Bigstring.t ‑> unit
val write_bigsubstring : t ‑> Core.Bigsubstring.t ‑> unit
val write_substring : t ‑> Core.Substring.t ‑> unit
val write_byte : t ‑> Core_kernel.Int.t ‑> unit
val write_char : t ‑> Core_kernel__.Import.char ‑> unit
val newline : ?⁠line_ending:Line_ending.t ‑> t ‑> unit
val stdout_and_stderr : (t * t) lazy_t
val stdout : t lazy_t
val stderr : t lazy_t
val behave_nicely_in_pipeline : ?⁠writers:writer Core.List.t ‑> unit ‑> unit
val apply_umask : int ‑> int
val with_file_atomic : ?⁠temp_file:Core_kernel__.Import.string ‑> ?⁠perm:Async_unix__Unix_syscalls.file_perm ‑> ?⁠fsync:bool ‑> Core_kernel__.Import.string ‑> f:(t ‑> 'a Async_kernel__Deferred.t) ‑> 'a Async_kernel__Deferred.t
val save : ?⁠temp_file:Core_kernel__.Import.string ‑> ?⁠perm:Async_unix__Unix_syscalls.file_perm ‑> ?⁠fsync:bool ‑> Core_kernel__.Import.string ‑> contents:Core_kernel__.Import.string ‑> unit Async_kernel__Deferred.t
val save_lines : ?⁠temp_file:Core_kernel__.Import.string ‑> ?⁠perm:Async_unix__Unix_syscalls.file_perm ‑> ?⁠fsync:bool ‑> Core_kernel__.Import.string ‑> Core_kernel__.Import.string Core.List.t ‑> unit Async_kernel__Deferred.t
val save_sexp : ?⁠temp_file:Core_kernel__.Import.string ‑> ?⁠perm:Async_unix__Unix_syscalls.file_perm ‑> ?⁠fsync:bool ‑> ?⁠hum:bool ‑> Core_kernel__.Import.string ‑> Core.Sexp.t ‑> unit Async_kernel__Deferred.t
val save_sexps : ?⁠temp_file:Core_kernel__.Import.string ‑> ?⁠perm:Async_unix__Unix_syscalls.file_perm ‑> ?⁠fsync:bool ‑> ?⁠hum:bool ‑> Core_kernel__.Import.string ‑> Core.Sexp.t Core.List.t ‑> unit Async_kernel__Deferred.t
val save_bin_prot : ?⁠temp_file:Core_kernel__.Import.string ‑> ?⁠perm:Async_unix__Unix_syscalls.file_perm ‑> ?⁠fsync:bool ‑> Core_kernel__.Import.string ‑> 'a Bin_prot.Type_class.writer ‑> 'a ‑> unit Async_kernel__Deferred.t
val with_flushed_at_close : t ‑> flushed:(unit ‑> unit Async_unix__.Import.Deferred.t) ‑> f:(unit ‑> 'a Async_unix__.Import.Monitor.Deferred.t) ‑> 'a Async_unix__.Import.Monitor.Deferred.t
val make_transfer : ?⁠stop:unit Async_unix__.Import.Deferred.t ‑> ?⁠max_num_values_per_read:int ‑> t ‑> 'a Async_unix__.Import.Pipe.Reader.t ‑> ('a Core_kernel.Queue.t ‑> cont:(unit ‑> unit) ‑> unit) ‑> unit Async_unix__.Import.Monitor.Deferred.t
val transfer : ?⁠stop:unit Async_unix__.Import.Deferred.t ‑> ?⁠max_num_values_per_read:int ‑> t ‑> 'a Async_unix__.Import.Pipe.Reader.t ‑> ('a ‑> unit) ‑> unit Async_unix__.Import.Monitor.Deferred.t
val transfer' : ?⁠stop:unit Async_unix__.Import.Deferred.t ‑> ?⁠max_num_values_per_read:int ‑> t ‑> 'a Async_unix__.Import.Pipe.Reader.t ‑> ('a Core_kernel.Queue.t ‑> unit Async_kernel__Deferred.t) ‑> unit Async_unix__.Import.Monitor.Deferred.t
val pipe : t ‑> Core_kernel__.Import.string Async_unix__.Import.Pipe.Writer.t