package async_extra
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=8084ad31437e9cede75470ac4f893c7a9d438c1c8502eea25fc3ef0af66aed00
CHANGES.md.html
v0.11
Removed the following modules from
Async_extra
:Cpu_usage
Dynamic_port_writer
File_tail
Persistent_singleton
Persistent_connection_intf
Sequencer_table
(available at: http://github.com/janestreet/sequencer_table )Tcp_file
Unpack_sequence
Versioned_typed_tcp
113.43.00
Add the ability to specify the local source port to Async_extra.Tcp.
Name the non-
t
arguments toError.tag
and similar functions to allow easier partial application.Name the non-
t
arguments toError.tag
and similar functions to allow easier partial application.Switched from:
(** This signature is deliberately empty. *)
to:
(*_ This signature is deliberately empty. *)
This causes the comment to not appear in documentation. We did not use:
(* This signature is deliberately empty. *)
because single-star comments,
(* *)
, will be disallowed in signatures. We plan to disallow single-star comments to force the use of(** *)
to indicate a doc comment and(*_ *)
to indicate a non-doc comment.Update
Async.Std.Schedule
to allow use ofTime_source.t
other thanwall_clock ()
.Time_source
is a new abstraction for time progression that providesClock
andTime.now
functionality driven by a time source other than the wall-clock. This can be useful for offline playback of historical events.Schedule
was updatedso it can be used in these kinds of historical playback situations.Add functions to make it easy to start a tcp server that only listens on localhost The intention of this change is to make it both easy to bind to localhost and to make it clear in the mli that you bind to any with
on_port
.Allow passing in a socket to the tcp functions so that you can set socket options before a connection is established
Make async_extra unit tests pass in 32bit
Improve errors on exceptions raised inside
Command.async'
.A trivial use of Command.async' that raises:
Before:
(((pid 7781) (thread_id 0)) ((human_readable 2016-04-22T19:11:26-0400) (int63_ns_since_epoch 1461366686545371364)) "unhandled exception in Async scheduler" ("unhandled exception" ((monitor.ml.Error_ ((exn (Failure "as;dfkj")) (backtrace ("Raised at file "pervasives.ml", line 30, characters 22-33" "Called from file "deferred1.ml", line 14, characters 63-68" "Called from file "job_queue.ml", line 160, characters 6-47" "")) (monitor (((name main) (here ()) (id 1) (has_seen_error true) (is_detached false)))))) ((pid 7781) (thread_id 0)))))
After:
$ ./a.exe (monitor.ml.Error_ ((exn (Failure "as;dfkj")) (backtrace ("Raised at file "pervasives.ml", line 30, characters 22-33" "Called from file "monitor.ml", line 214, characters 42-51" "Called from file "job_queue.ml", line 160, characters 6-47" "")) (monitor (((name Async.Std.Deferred.Or_error.try_with) (here ()) (id 2) (has_seen_error true) (is_detached true))))))
After with
~extract_exn:true
:$ ./a.exe (Failure "as;dfkj")
The default can be changed for a project this way:
module Command = struct include Command let async' = async' ~extract_exn:true let async_or_error' = async_or_error' ~extract_exn:true end
Added module
Async.Std.Require_explicit_time_source
, so that one can require code to be explicit about what time source is used and not unintentionally use the wall clock. The idiom is to do:open! Require_explicit_time_source
or, in an import.ml:
include Require_explicit_time_source
Don't wait for the full
retry_delay
before detectingclose
.
113.33.00
Rename
Async.Std.Schedule.every_{enter,tag_change}
toAsync.Std.Schedule.every_{enter,tag_change}_without_pushback
and introduceAsync.Std.Schedule.every_{enter,tag_change}
with pushback behavior.The resulting functions are analogous to
Pipe.iter_without_pushback
andPipe.iter
.Replaced
Persistent_rpc_client
with a successorPersistent_connection
for maintaining persistent connections to all manner of services, not just rpc servers.Make
Bus.pipe1_exn
take aSource_position.t
to be more consistent withfirst_exn
anditer_exn
. This also shows better debug sexps onBus
when multiple pipes are subscribed to the bus.
113.24.00
N.B. some changes happening for this release are not listed in this changelog since they appear only as a consequence of changes in core or async_kernel.
When
Transfer.Writer.send*
raises, send an error to the client.Add a new rpc that enables a "push" rather than a "poll" model.
Switched to PPX.
For connected UDP sockets, expose
send
in the same fashion assendto
.Tcp.Server
is documented to refuse excess connections beyondmax_connections + max_pending_connections
, but it treats them as pending connections in our standard OS configuration. In fact, research indicates that the documented behavior is nearly impossible to obtain directly and consistently fromlisten
.Clarify the name and role of the
backlog
argument tolisten
and rename and update documentation formax_pending_connections
to clarify what it actually does, in light of some research:`listen` does not generally respect the backlog argument as an upper limit, but as a lower limit (mod `tcp_max_syn_backlog`) and, with `tcp_abort_on_overflow=0`, `listen` will ignore excess connections rather than actively refusing them. (With `syncookies=1`, this can look like an indefinite backlog.)
Existing, working code can substitute
max_pending_connections -> backlog
and move on. The behavior is not changed.When possible, consider architecting applications so the server can simply accept and close excess connections, rather than relying on the
listen
backlog to return an active indication to the client that they won't be serviced. To make sure the client receives an RST rather than an orderly shutdown, you can set the linger time to 0 before closing the socket. (Added to unit tests.)Direct
Tcp.Server
support for this paradigm is left for future work.Make
Rpc_low_latency_transport
treat disconnections as eof, likeAsync_unix.Reader
does.Add an implementation of Mvars to Async
Allow custom handling of missed async_rpc heartbeats.
adds a configuration limit on the number of tokens that can be in-flight
Replace an
#include <sys/errno.h>
by#include <errno.h>
.Fixes janestreet/async_extra#4
Added
Tcp.Server.sexp_of_t
Adds
Rpc.Pipe_rpc.dispatch_iter
, plus a bunch of additional types to support it. The main reason for this is to reduce space usage:Pipe_rpc.dispatch
followed byPipe.iter_without_pushback
consumes ~105 words in the steady state (i.e., when no messages are coming in) whiledispatch_iter
consumes ~15. I'm suredispatch
can be improved a lot, but a pipe by itself is 46 words, so it can't possibly become as small asdispatch_iter
.Both cases can be made smaller by making
Connection.response_handler
a GADT instead of a closure. I plan to do this later.One annoying property of the interface is that the only way to cancel a subscription is to use
Pipe_rpc.abort
, which has a terrible interface. The logical way to improve the interface is to return a record of aPipe_rpc.t
, aConnection.t
, and aQuery_id.t
, which allocates an additional few words. I'd kind of like to do this but it seems counter to the goal of reducing space usage.Added
Tcp.Server.listening_on_address
, so that one can get the address a server is listening on, as compared withlistening_on
, which just returns the port.Marked Command.async_basic as deprecated using the appropriate ocaml attribute.
@@ocaml.deprecated
(http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec241)
Extend the interface of
Persistent_rpc_client
to make the "address" type - previously fixed asHost_and_port.t
- abstract. This is helpful for integrating with libraries that have a different notion of an address, e.g.rpc_discovery_lib
.Typed_tcp
mutated a Hashtbl while iterating over it when closing.Added
Async.Bus.first_exn
, which takes a bus and a function, and returns a deferred that becomes determined when the first event is published to the bus for which the function returnsSome
.This function is useful to reduce boilerplate for dealing with unsubscription.
Reduced the number of threads required by tests in:
async_extra/src/tcp.ml
Added to the error message
Bus.subscribe_exn called after first write
the source-code position of the caller, in case there isn't a backtrace, to make the source of the problem clearer, and to avoid confusion with other source-code positions of subscribers already in the bus.Added to
Bus.first_exn
aSource_code_position.t
argument, so that in the event of subscription failure, we can see who caused the subscription to the bus.Added to
Tcp.Server.close
an optional argument:?close_existing_connections : bool
This closes the sockets of all existing connections.
Annotate errors returned by the async-rpc library with the name of the RPC for which the error was returned (if it's an rpc-level error) and a description of the remote side of the connection (the ip:host if connected via a network socket).
Improved
Async.Udp.bind
's error message when it fails tomcast_join
a multicast group.Change
~callback
to~f
throughout theBus
interface
113.00.00
Added
Limiter
module.Implements an async aware throttling rate limiter on top of
Core.Limiter
.Generalized
Persistent_rpc_client
to supports RPC connection types with additional information besides theRpc.Connection.t
itself.For instance:
Persistent_rpc_client.Versioned
hasVersioned_rpc.Connection_with_menu.t
as its connection type.Changed the
Persistent_rpc_client.Make
functor to not erase the typeconn
from its output module's signature.This way, the output of
Make
can be fed to functors or functions that expect a module matchingPersistent_rpc_client.S
.Moved
Log
fromAsync_extra
toAsync_unix
, so that the scheduler can refer to it.Fixed a bug where
Persistent_rpc_client.close
would hang waiting for a connection to close.
112.35.00
Added to
Log
a better mechanism for catching and handling background errors, viaset_on_error
and anon_error
argument tocreate
.Added
Log.get_output : t -> Output.t list
.Changed
Monitor.try_with
so that errors after the initial return are written to the global error log, rather than ignored.Added
Monitor.try_with_or_error
andtry_with_join_or_error
.try_with_or_error
is intended to someday be renamed astry_with
. It also omits some oftry_with
's optional arguments:run
andrest
. Different fromtry_with
,try_with_or_error
uses~run:`Now
, which we now believe is a more sensible behavior.Fixed a bug in
Versioned_typed_tcp
that causes spurious and repeated reconnects when user-level code disconnects.Added
Tcp.Server.create_sock
, to create TCP servers that don't useReader
andWriter
.Changed
Log.Level.arg
to accept lowercase, uppercase, and capitalized words.Replaced
Unpack_sequence.unpack*
functions withunpack_into_pipe
andunpack_iter
, for reduced allocation.module Unpack_from : sig type t = | Pipe of string Pipe.Reader.t | Reader of Reader.t end val unpack_into_pipe : from : Unpack_from.t -> using : ('a, 'b) Unpack_buffer.t -> 'a Pipe.Reader.t * ('a, 'b) Unpack_result.t Deferred.t val unpack_iter : from : Unpack_from.t -> using : ('a, 'b) Unpack_buffer.t -> f : ('a -> unit) -> ('a, 'b) Unpack_iter_result.t Deferred.t
Added to
Log
support for user-defined rotation schemes.Added
Log.is_closed
.Moved
Async_extra.Rpc
to its own library,Async_kernel_rpc
, and abstracted its transport layer.Async_kernel_rpc
depends only onAsync_kernel
. This allowsAsync_rpc
to be used in javascript or to try transports tuned for different use cases.Versioned_rpc
was moved toAsync_rpc_kernel
as well.Async_extra
still provides anRpc
module with the Unix-dependent part:the
Rpc.Transport
module is augmented withAsync_unix.{Reader,Writer}
based transportsthe
Rpc.Connection
module is augmented with helpers for TCP based connections
In sexp-formatted
Log
messages, output the sexp on a single line rather than in multi-line "hum"an format.This makes it possible to, among other things, easily grep such logs.
Fixed a (very small) space leak in
Persistent_rpc_client
.The fix was to use
Deferred.choose
andDeferred.choice
instead ofDeferred.any
and>>|
. The old implementation added a callback to thet.close_started
ivar every time the connection transitioned from connected to disconnected.Added
Persistent_rpc_client.create_generic
, which is likecreate
, but generic in the function used to connect.Fixed a race condition in the
Versioned_typed_tcp
interface that caused a worker to miss aConnect
message if the box is under high load.Query_client.create
is called fromWorker_impl.create
in a different async cycle than the following call toQuery_client.listen
(really,Tail.collect
under the hood) which is made fromWorker_impl.run
.When the load on the box is heavy (many workers starting and connecting at the same time), the OS might take away the CPU from the worker process between the two async cycles. The TCP socket gets connected while the process is still waiting for its turn, and eventually, when it's the worker's turn to grab the CPU, Async scheduler might process the TCP event earlier than
Worker_impl.run
.Improved
Udp.ready_iter
to avoid intermediate exceptions by usingSyscall_result
.UDP loops use that, so will benefit.
Adjust the implementation slightly as well: made the inner loop always exit on
EAGAIN
/EWOULDBLOCK
to wait until ready, and give other Async jobs a chance to run afterEAGAIN
/EWOULDBLOCK
in the outer loop.
112.24.00
Changed
Log
to not eagerly run the rotation loop when anOutput.Rotating_file
is created.Changed
Log.Output.combine
to write log outputs in sequence rather than parallel, to give the correct semantics when the same output is included multiple times inLog.create
.This fixed a test that was failing in
lib_test/log_test.ml
.Remove
Log.Rotation.t_of_sexp
.Made
Command.async*
functions flushstdout
andstderr
before calling shutdown, to avoid timeouts causing data to be dropped.For now, we're making this change in
Command
rather thanWriter
.Writer
already hasat_shutdown
handlers. We've observed that they don't behave well for command-line programs w.r.t. stderr. So, the thinking of this feature is to try out a differentat_shutdown
behavior, just forCommand
executables and just forstdout
andstderr
. If it works out, maybe we move it intoWriter
proper. Putting the change inCommand
for now reduces the scope of what is affected by the experiment, and hopefully correlates well with where the change is likely to help.In
Rpc
, catch exceptions raised by blocking-RPC implementations.Added functionality to
Versioned_typed_tcp.Repeater
.Added to
create
an argumentis_client_allowed : Client_name.t -> bool
.Added to
start
an argument:on_connecting_error : (client_name : Client_name.t -> server_name : Server_name.t -> Error.t -> unit)
Fixed a race in
Versioned_typed_tcp
in which a message can be dropped betweenServer.create
andServer.listen
Simplified the implementation of
Rpc
.Rpc has an internal Response_handler module, which is just a record containing a response-handling function and an
already_removed
boolean field. It turns out that this is unnecessary:already_removed
is set to true when the function returnsremove`, but if it returns
remove` then it will also be removed from a hash table, and we only call the function immediately after looking it up in that hash table.This wasn't always pointless: this function used to return deferred values and run inside a throttle. The simplification is only possible because we made it synchronous a while ago.
Added
Tcp.Server.num_connections
function.Added creation functions for
Versioned_rpc
menus, for use in clients of an RPC proxy.In
Menu
:val create : Implementation.Description.t list -> t
In
Connection_with_menu
: val create_directly : Connection.t -> Menu.t -> tThese are for use in clients of an RPC proxy, which can't use the regular menu mechanism since they each need to have many menus (one for each potential target) but should only need to have one connection (to the proxy).
Added to
Rpc
expert submodules,Implementations.Expert
andRpc.Expert
, with low-level access for implementing a proxy that can handle queries without knowing their names, types, etc. in advance.Renamed
Rpc.Implementation.Description
asRpc.Description
.Added
Rpc.{Rpc,Pipe_rpc,State_rpc}.description
accessor functions.Added
Rpc.Implementation.descriptions
, which returns all RPCs in anRpc.Implementations.t
. This was needed for therpc_discovery
library: given anImplementations.t
we want to advertise atprefix/<rpc_name>/<rpc_version>/host_and_port = <host_and_port>
Added combinators to
Rpc.Implementations
:lift
,add
,add_exn
.
112.17.00
Modernized code style in
Async_extra
.This was mostly whitespace changes, plus deletions of unneeded module paths.
Added
with sexp_of
toTcp.Where_to_listen
for debugging.In
Versioned_typed_tcp
, check that the writer on the other side is not closed in thePass_on
case.Added a new way to implement an RPC, where the implementation doesn't return a deferred.
This "blocking" rpc implementation guarantees that the rpc will in fact be fully dispatched by the time the implementation returns.
This can be used to skip the deserialization of the query, and instead operate directly in the message contents as received.
Also, fixed a bug in which the query handler (and therefore the connection state) was being called before the internal async rpc handshake was finished.
Added an optional
job_tag
argument toSequencer_table.enqueue
, to display for debugging.Added an optional argument to TCP-connection functions to control the local interface used to connect.
To implement this this, extended
Tcp.connect
to work on a bound socket.Added
with compare
toProcess.Output.t
.Added
Process.Output.Stable
module.Exposed concrete rpc in
Versioned_rpc.Both_convert
.Changed
Cpu_usage
to take its first sample after waiting, rather than immediately.This fixes a problem where the first sample could be
NAN
orInf
.Made
Log
buffer-age be unlimited, to avoid exceptions when log writes are blocked for long periods.Improved
Log.t_of_sexp
's error message.Changed
Rpc.Connection.client
andwith_client
to raise some errors which had been dropped during RPC dispatch.Previously, errors dispatching
Rpc.Rpc.t
's were handled correctly and returned or raised by the relevant dispatch functions. However, errors that occurred in the middle of handling aRpc.Pipe_rpc.t
orRpc.State_rpc.t
were swallowed. This is because they happen after the dispatch functions have returned, and the dispatch interface doesn't allow for errors to occur in the middle of the pipe -- they must be raised to the monitor in effect when theRpc.Connection.t
is created. Errors could be raised to the effective monitor at the dispatch call, but the failure causes the entire connection to go into error, so the connection's monitor seems more appropriate. These errors weren't propagated to the caller becauseclient
andwith_client
both usedMonitor.try_with
withoutrest
handling, causing /any/ errors caused while handling the connection (after theConnection.t
has been returned to the user) to be dropped.In
Rpc
, exposed some optional parameters from theTcp
module:?max_pending_connections
and?buffer_age_limit
.
112.06.00
In
Log
, exposed the raw message.Changed
Rpc
creators'connection_state
to be a function that takes the connection and returns the state.This makes it possible for the connection state to actually get a handle on the connection itself, which simplifies a number of idioms for using RPC. In particular, it makes it easier to respond with an RPC back to a client over client's own connection.
Fixed some nondeterministically failing tests.
In
Log
, made logs discard messages when their output list is empty.Also, removed redundant tracking of current level.
Moved
Udp.bind_to_interface_exn
toUnix
module inasync_unix
.Added
Versioned_typed_tcp.Repeater
.Repeater is used in the cases where we want to inspect and possibly alter the flow between a client and a server without having to change either the client or the server or the protocol between them.
112.01.00
Changed
Persistent_rpc_client.connected
to avoid returning a connection that is closed at the time it was called.Optimized
Rpc.implement
so that if a server's implementation returns a determined deferred, then the output is immediately serialized and written out for the client.This reduces memory consumption, improves throughput and latency. Measurements with the
pipe_rpc_test program
showed that a server went from processing 600_000 msg/sec, to 2_200_000 msg/sec before pegging the CPU.Changed
Log
's output processor's batch size from1_000
to100
.Added
Persistent_rpc_client.close
andclose_finished
.In
Rpc.Connection.client
andwith_client
, used thehandshake_timeout
as thetimeout
passed toTcp.connect
.handshake_timeout
was previously used only for theRpc
module's handshake timeout.Changed
Rpc.create
'son_unknown_rpc
argument, renaming\
Ignoreas
`Close_connection, and requiring
`Callto return
`Close_connectionor
`Continue`.\
Ignore` was renamed because it was a poor name, since in fact it closed the connection.Added a
\
Continue` option, whic allows one to keep the connection open.Changed
\
Callto return
`Continueor
`Close_connection, where the old
unitreturn value meant
`Close_connection`.In
Versioned_typed_tcp
, enabled the use of "credentials" in the "Hello" message.Propagate credentials to the user code when it arrives on the wire.
111.28.00
Added to
Versioned_rpc
a non-functor interface.Added
Log.level
, which returns the last level passed toset_level
.Enabled Async-RPC pushback in the
Tcp_file
protocol.
111.25.00
Removed
lazy
from the core ofLog
.Made
Log.Message.t
have a stablebin_io
.The
Stable.V1
is the current serialization scheme, andStable.V0
is the serialization scheme in 111.18.00 and before, which is needed to talk to older systems.Changed
Rpc
to returnConnection_closed
if a connection ends before a response makes it to the caller.Previously, the dispatch output was never determined.
Also, removed an unused field in one of the internal data structures of Async RPC.
In
Versioned_rpc
, addedversion:int
argument toimplement_multi
functions.In
Versioned_rpc
, thePipe_rpc.Make
functors now return an additional output functor.Register'
is likeRegister
but has in its input module:val response_of_model : Model.response Queue.t -> response Queue.t Deferred.t
rather than
val response_of_model : Model.response -> response
This is analogous to
Pipe.map'
andPipe.map
.Added to
Log
aV2
stable format and better readers for time-varying formats.In
Log
, added an optional?time:Time.t
argument to allow callers to pass in the logged time of an event rather than relying onTime.now ()
.
111.21.00
Added
Sexp_hum
Log.Output.format
, which is useful for making logs more human readable.Added
with compare
toRpc.Implementation.Description
.
111.17.00
Added module
Persistent_rpc_client
, an RPC client that attempts to reconnect when the connection is lost, until a new connection is established.Significantly sped up the
Rpc
module by removingBigstring
serialization.Performance of the two implementations was tested by building a simple client/server executable that would count major cycles. Sending 100 byte messages at a rate of 50k/second shows (on both sides of the RPC):
original:
~160 major cycles in 30s
CPU usage around 60%
new:
~10 major cycles in 30s
CPU usage <= 2%
Enabled a version of
Pipe_rpc
andState_rpc
where the consumer can pushback on the producer if it can't consume the contents of the pipe fast enough.Added
Log.Level.arg : Log.Level.t Command.Spec.Arg_type.t
for defining command lines that accept (and autocomplete) log levels.Added
Command.async_or_error
and renamedCommand.async_basic
toCommand.async
, leavingasync_basic
a deprecated alias for the new name.Command.async_or_error
is similar toCommand.basic
andCommand.async
, but accepts aunit Or_error.t Deferred.t
type.Added
Persistent_rpc_connection.current_connection
, so that one can detect whether one is currently connected.val current_connection : t -> Rpc.Connection.t option
111.13.00
For
Typed_tcp.create
, added aClient_id.t
argument to theauth
callback.
111.11.00
Made
Log
more fair with respect to other Async jobs, by working on fixed-length groups of incoming log messages.Previously,
Log
had processed everything available. The change gives other Async jobs more of a chance to run.
111.08.00
Added
Log.Message.add_tags
, which extends a message with a list of key-value pairs.val add_tags : t -> (string * string) list -> t
111.06.00
Added
?on_wouldblock:(unit -> unit)
callback toUdp.recvmmsg_loop
andrecvmmsg_no_sources_loop
.For functions that create
Rpc
connections, added optional arguments:?max_message_size:int
and?handshake_timeout:Time.Span.t
.These arguments were already available to
Connection.create
, but are now uniformly available to all functions that create connections.
111.03.00
Add
?max_connections:int
argument toRpc.Connection.serve
.max_connections
is passed toTcp.Server.create
, and limits the number of connections that an Rpc server will accept.Improved
Log.Rotation
:Made
Log.Rotation.t
abstract; usecreate
rather than an explicit record.Added a
`Dated
naming_scheme
.Add
Log.Rotation.default
, for getting a sensible default rotation scheme.Added an optional (but discouraged) option to symlink the latest log file.
Every log rotation scheme has an associated
Time.Zone.t
.Changed the internal representation of
Log.Rotation.t
, butt_of_sexp
is backwards compatible, so existing config files will continue to work.
Changed
Udp.bind_any
to useSocket.bind ~reuseaddr:false
, to ensure a unique port.Added
Tcp.Server.listening_socket
, which returns the socket the server is listening on.Changed
Tcp.Server
so that if the listening socket is closed, the server is closed.Added to
Udp.Config.t
amax_ready : int
field to prevent UDP receive loops from starving other async jobs.Improved
File_tail
to cut the number offstat
calls in half.File_tail
uses a stat loop to monitor a file and continue reading it as it grows. We had made twofstat
invocations per loop iteration, usingAsync.Std.Unix.with_file
which constructs anFd.t
and therefore does it ownfstat
. Switching toCore.Std.Unix.with_file
withIn_thread.run
eliminated the extrafstat
.
110.01.00
Added
Cpu_usage.Sampler
for directly sampling CPU usage.Fixed
Log.rotate
to never raise.Fixed two bugs in
Log
rotation.Log rotation had used the wrong date when checking whether it should rotate.
Made
Rotation.keep = \
At_least` delete the oldest, rather than the newest, logs.
109.60.00
Replaced
Tcp_file.serve
's~port:int
argument withTcp.Where_to_listen.inet
.
109.58.00
Changed
Cpu_usage
to useCore.Percent
instead offloat
where appropriate.Made
Bus.unsubscribe
check that the subscriber is subscribed to the given bus.Made
Log.t
supportwith sexp_of
.Fixed
Tcp.on_port 0
to return the port actually being listened on, likeTcp.on_port_chosen_by_os
.Previously, a serverlistening on
Tcp.on_port 0
would have itsTcp.Server.listening_on
as0
, which of course is not the port the server is listening on.
109.55.00
Added
Udp.recvmmsg_no_sources_loop
, a specialization ofrecvmmsg_loop
for improved performance.This improvement was driven by profiling at high message rates.
109.53.00
Added module
Bus
, which is an intraprocess "broadcast" communication mechanism.Added
Tcp.to_inet_address
andto_unix_address
.Added
Tcp.to_socket
which creates aTcp.where_to_connect
from aSocket.Address.Inet.t
.Module
Weak_hashtbl
is now implemented as a wrapper aroundCore.Weak_hashtbl
.No intended change in behavior.
109.52.00
Added module
Cpu_usage
, which publishes CPU-usage statistics for the running process.Fixed
Sequencer_table.enqueue
so that there is no deferred between finding the state and calling the user function.
109.47.00
Added
with sexp
toLog.Output.machine_readable_format
andformat
.
109.45.00
Added
?abort:unit Deferred.t
argument toLock_file.waiting_create
,Lock_file.Nfs.waiting_create
andcritical_section
.
109.44.00
Fixed a time-based race condition in
Log
rotation.
109.42.00
Fixed
Log.Blocking
so that when async is running it writes the message in syslog before failing with an exception.
109.40.00
Added to
Udp.Config
the ability to stop early, viastop : unit Deferred.t
.
109.38.00
In
Rpc
, exposed accessors for binary protocol values.For example, this allows one to write a wrapper for
Pipe_rpc
that allows for the easy re cording and replaying of values the come over the pipe.
109.35.00
Added module
Async.Udp
, aimed at high-performance UDP applications.Added module
Lock_file.Nfs
, which wraps the functions inCore.Std.Lock_file.Nfs
.
109.33.00
Change
Log.Global
to by default send all output, including`Info
, tostderr
.Replaced
Log.Output.screen
withLog.Output.stderr
. There is now also andLog.Output.stdout
.
109.32.00
Added
Dynamic_port_writer
.Dynamic_port_writer
solves the problem of communicating a dynamically selected tcp port from a child process to its parent.
109.28.00
Fixed an error message in
Versioned_rpc
that was swapping which versions were supported by the caller and the callee.
109.27.00
Added function
Versioned_typed_tcp.Client.shutdown
.Added new module
Sequencer_table
, which is a table ofThrottle.Sequencer
's indexed by keys.
109.24.00
Made the
Caller_converts
interface inVersioned_rpc
use theConnection_with_menu
idea introduced inBoth_convert
.
109.19.00
Added function
Versioned_typed_tcp.Client.flushed : t -> [
Flushed |Pending of Time.t Deferred.t ]
.This exposes whether the underlying
Writer.t
has been flushed.
109.17.00
Added an option to
Async.Log.Rotation
to include the date in logfile names.This is mostly for archiving purposes.
Made
Versioned_rpc.Callee_converts.Pipe_rpc.implement_multi
agree withRpc.Pipe_rpc.implement
on the type of pipe rpc implementations.Improved the performance of
Versioned_typed_tcp
.Avoided creating deferreds while reading the incoming messages.
109.15.00
In
Rpc.client
andRpc.with_client
, allowed the client to implement the rpcs.Added a new optional argument:
?implementations:_ Client_implementations.t
.Added new module
Versioned_rpc.Both_convert
to allow the caller and callee to independently upgrade to a new rpc.This is a new flavor of
Versioned_rpc
in which both sides do some type coercions.
109.12.00
Made explicit the equivalence between type
Async.Command.t
and typeCore.Command.t
.
109.11.00
Exposed a
version
function inPipe_rpc
andState_rpc
.
109.10.00
Fixed a race condition in
Pipe_rpc
andState_rpc
. This race could cause an exception to be raised on connection closing.
109.08.00
Added module
Async.Command
This isCore.Command
with additional async functions. In particular it contains a functionasync_basic
that is exactly the same asCore.Command.basic
, except that the function it wraps returnsunit Deferred.t
, instead ofunit
.async_basic
will also start the async scheduler before the wrapped function is run, and will stop the scheduler when the wrapped function returns.