Update Async_command.with_options:
behave_nicely_in_pipeline parameterWriter.behave_nicely_in_pipeline() when the command startsUpdate Async_quickcheck.async_test function:
sizes parameter to specify a sequence of sizes for generated test datashrinker parameter to provide a custom shrinker for the test datashrink_attempts parameter to control the number of attempts at shrinking test dataAsync_rpc.Rpc:handshake_timeout parameter type from Time.Span.t to Time_float.Span.t.on_handshake_error type from Rpc.Connection to simplify the interfaceChanges in Async_rpc.Rpc_transport:
writer_buffer_size parameter to Rpc_transport.of_fdAdd new function to Rpc_transport_low_latency.Reader.With_internal_reader:
read_one_message_bin_prot_without_buffering
Rpc_kernel.Transport.Reader.read_one_message_bin_protChanges in Lock_file_async.Flock:
Flock.lock_exn and Flock.lock now have optional exclusive and close_on_exec parameters
exclusive controls exclusive access to the lockclose_on_exec specifies whether to close the lock when executing a new programUpdate functions in Flock module in Lock_file_async:
exclusive parameter, enabling shared locks when set to false (previously exclusive locks only)close_on_exec parameter to control if the lock is closed on execChanges in Persistent_connection:
retry_delay and handshake_timeout changed from Time.Span.t to Time_float.Span.tChanges in Unpack_sequence:
Added a new function: Unpack_sequence.unpack_iter_with_pushback
unpack_iter, but waits for pushback after unpacking every chunkasync.log_extended, extending Async.Log with Console and Syslog submodules.async.unpack_sequence, for efficiently unpacking a sequence of packed values coming from a string Pipe.Reader.t or a Reader.t.Weak_hashtbl was moved into its own library Weak_hashtbl_async, which is released as part of the async package.Tcp.Server.close_finished_and_handlers_determined.Persistent_connection to Async_kernel, so that it can be used in javascript.Log.Output to write, flush, rotate, or close all Log.Output.ts, even if one raisesAsync.print_s for pretty printing a sexp to stdout.Reader.load_bin_prot to always return Error when there is an error, rather than return Error in some situations and raise in others.Scheduler.may_sleep_for_thread_fairness, an opt-in configuration that improves thread fairness.Sys.file_exists function a follow_symlinks optional argument.at_exit functions once, not twice.Writer.open_file, exposed the syscall optional argument.Async.ifprintf, which had previously been mistakenly shadowed even though it doesn't block.Synchronous_time_source.t and Time_source.t, into a single data structure, allowing one to convert between them as needed. This involved substantive changes to Async's clock.Time_source.timing_wheel_now.Log.Level and Log.Output.format.at_shutdown handlers time out), it calls Pervasives.exit, which runs at_exit handlers. This improves Command.async in this situation, due to its use of an at_exit handler to print errors.Process.run's error message when working_dir is missing.Rpc.Connection.create so that it doesn't raise on a failed handshake.Log.printf when the log message won't be printed, by using ifprintf to avoid constructing the message.Socket.Address functions Inet.to_sockaddr and Unix.to_sockaddr, the type specialized versions of Socket.Address.to_sockaddr.Socket.bind_inet, which is like bind, but restricted to Inet addresses and does not return a Deferred.t. Changed Udp.bind and bind_any to not return a Deferred.t.File_tail.create an optional ?throttle argument so that one can use a custom throttle and max_concurrent_jobs rather than a global throttle with a fixed max_concurrent_jobs.Tcp and Rpc's via_local_interface and via_local_port arguments as bind_to_address and bind_to_port.Tcp.Server.create and create_sock's ~on_handler_error argument mandatory.Tcp.Server, stopped calling on_handler_error for Writer error from inner_monitor, which only indicated that the client likely closed the connection before all the bytes could be written.Command.async as async_spec and Command.async' as async. We want to encourage the use of Command.Param and discourage the use of Command.Spec.Async so that in tests it uses synchronous output.Async's default max number of open file descriptors from 8_192 to the minimum of 32_768 and ulimit -n -H.Time_ns.now and Linux_ext.Timerfd.set_after unless they are needed. This saves about 50ns per cycle.Tcp functions for specifying where to connect and where to listen into submodules: Where_to_connect and Where_to_listenTcp.to_host_and_port from taking a string and int to Tcp.Where_to_connect.of_host_and_port, taking a Host_and_port.tRpc.Connection.client to take a Tcp.Where_to_connect.t instead of ~host ~port.Synchronous_time_source.Event.abort to return a variant type, in the same style as Time_source.Event.abort. Added abort_exn and abort_if_possible, also in the same style as Time_source.Event.Scheduler.long_cycles, which returns the stream of cycles whose duration exceeds a user-supplied time span. This is more efficient than cycle_times, because it only allocates a stream element when there is a long cycle, rather than on every cycle.Async_unix, Async_extra.Udp.recvfrom_loop and read_loop functions to return a variant Closed | Stopped rather than unit.Unix.Inet_addr module's interface to include Core.Unix.Inet_addr's interface.Monitor, in particular Monitor.handle_errors.Monitor.try_with.Keep up to date with interface changes in Async_kernel, Async_extra and Async_unix.
Keep up to date with interface changes in Async_kernel, Async_extra and Async_unix.
Added Async.Std.Printf module so that one doesn't unintentionally use blocking Core.Std.Printf functions in an Async program.
There was much pre-existing code that did this via:
: open Core.Std : open Async.Std
Async.Std.Printf defines blocking functions (e.g printf, eprintf) to cause a type error, but leaves Async-friendly functions (e.g. sprintf, ksprintf) untouched.
Replaced uses of Printf.*, with Core.Std.Printf.* where needed.
Keep up to date with interface changes in Async_kernel, Async_extra and Async_unix.
Added tests and updated examples
Added function Monitor.kill, which kills a monitor and all its descendants.
This prevents any jobs from ever running in the monitor again.
Async.Std's toplevel bindings for Deferred.Or_error's bind and map to use Deferred.Result. This allows them to be used with any 'error type, rather than just Error.t.val _squelch_unused_module_warning_ to Async.Std.