OCamlPro/opam-repository — pull request #741 by ysulsky (2013-05-24 19:38:34+00:00)
Title: core-109.24.00-rc1

## textutils

- Initial release, this is a utility library for formatting text to terminals

## core_bench

- Intial release, this is a benchmarking library that aims to have more statistically
accurate timing results

## async_core

- Reworked the `Throttle` module.

Made both `Throttle.t` and `Throttle.Sequencer.t` instances of the
same type, using a phantom type to distinguish them. Removed all
`Throttle.Sequencer` functions -- one can now use the `Throttle`
functions directly.

Added new functions:

```ocaml
(*** [max_concurrent_jobs t] returns the maximum number of jobs that [t] will run
concurrently. *)
val max_concurrent_jobs : (_, _) t_ -> int

(*** [num_jobs_running t] returns the number of jobs that [t] is currently running. It
is guaranteed that if [num_jobs_running t < max_concurrent_jobs t] then
[num_jobs_waiting_to_start t = 0]. That is, the throttle always uses its maximum
concurrency if possible. *)
val num_jobs_running : (_, _) t_ -> int

(*** [num_jobs_waiting_to_start t] returns the number of jobs that have been [enqueue]d but
have not yet started. *)
val num_jobs_waiting_to_start : (_ , _) t_ -> int

(*** [capacity_available t] becomes determined the next time that [t] has fewer than
[max_concurrent_jobs t] running, and hence an [enqueue]d job would start
immediately. *)
val capacity_available : (_, _) t_ -> unit Deferred.t

Replaced the `Pipe` used inside a `Throttle` with a `Queue`, and
simplified the implementation. This fixed a bug in
`num_jobs_waiting_to_start`, which could have missed a job that was
not in the pipe but had not started.
```
## async_extra

- Made the `Caller_converts` interface in `Versioned_rpc` use the
`Connection_with_menu` idea introduced in `Both_convert`.

## async_unix

- Changed `Reader.close` so that it frees the reader buffer using `Bigstring.unsafe_destroy`.

This is an improvement over the previous situation, in which the
buffer wasn't freed until its finalizer fired.

- Fixed a bug in `Reader.read_bin_prot`.

It was missing a try-with that could cause it to raise without
cleaning up the reader.

## core

- Added module `Core.Iobuf`, a module aimed at zero-copy I/O.

An iobuf is a bigstring combined with a position and length, that
defines a contiguous region of bytes in the bigstring. Operations on
an iobuf operate relative to start of the region and cannot look
outside the region.

- Added module `Core.Validated` for creating an abstract type that
ensures a validation function has been run.

- Added function `Bigstring.recvmmsg_assume_fd_is_nonblocking`, which
allows one to read a number of UDP packets with a single system
call.

- Fixed `Unix.create_process` on OSX.