OCamlPro/opam-repository — pull request #897 by ysulsky (2013-07-16 17:39:18+00:00)
Title: core 109.34.00-rc1

## Pa_test
- Added new quotation expanders `<:test_eq< >>` and `<:test_pred< >>`.

These can be used to reduce boilerplate in testing code.

- `<:test_eq< type >>` expands to a function of type
```ocaml
?(f = (fun x y -> <:compare< type >> x y = 0))
-> ?here:Lexing.position list
-> type
-> type
-> unit
```
that throws a nice exception if the values are not equal according to `f`.

- `<:test_pred< type >>` expands to a function of type
```ocaml
?here:Lexing.position list -> (type -> bool) -> type -> unit
```
that throws a nice exception if the predicate fails on the value.

## Async_core
- Added a function to `Pipe` that merges a list of sorted pipes.

`val Pipe.merge : 'a Reader.t list -> cmp:('a -> 'a -> int) -> 'a Reader.t`

- Improved the performance of `Ivar.squash` by removing the allocation of the list of ivars.

Instead, `squash` does one loop to find the end of the chain and a
second loop to set all the indirections.

- Changed `Scheduler.run_cycles_until_no_jobs_remain` to raise an exception if there is an unhandled exception when it finishes.

## Async_unix
- Changed the scheduler to detect when the thread pool is stuck, i.e. when all threads are blocked and haven't made progress.

Added default handlers for when the thread pool is stuck, and the
ability for the user to configure their own handlers.

- Changed low-level I/O to not use nonblocking I/O for char devices.

This fixes a problem due to `epoll` not working with `/dev/null`. For
example:

```ocaml
let () =
Reader.read_line (Lazy.force Reader.stdin)
>>> fun _ ->
shutdown 0
;;
let () = never_returns (Scheduler.go ())
```

had failed when run like:

```
+ ./z.exe t option`.

This is more convenient to use than `Backtrace.get`, which is an
`Or_error.t`.

- Moved functions for dealing with finalizers into the `Gc.Expert` module.

This was done to make people be very explicit and sure that they want
finalizers, which are very hard to use because they essentially
introduce multithreading semantics.

One should typically use async finalizers.

- Eliminated the thread that had been used to sequentialize all finalizers.

## Core_extended
- Improved `Sexp.Diff`.

Labeled arguments, put them in the right order (old before new), and
rework the code to follow the same convention, and produce the output
where deletions precede insertions.

## Core_bench
- Made the `-save` switch save more data.

- Improved the float-printing routines.

- Lots of cleanup and newer tests in `lib_test`.