Skip to content

Commit

Permalink
108.07.00
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremie Dimino committed Jan 28, 2013
1 parent c8863c7 commit 1285cdc
Show file tree
Hide file tree
Showing 35 changed files with 2,446 additions and 933 deletions.
4 changes: 2 additions & 2 deletions INSTALL.txt
@@ -1,5 +1,5 @@
(* OASIS_START *)
(* DO NOT EDIT (digest: 693a321c442ea48ffba0ef04acf5e803) *)
(* DO NOT EDIT (digest: 52ad89aa3e7f169063a4064028db7dd6) *)
This is the INSTALL file for the async_extra distribution.

This package uses OASIS to generate its build system. See section OASIS for
Expand All @@ -9,7 +9,7 @@ Dependencies
============

In order to compile this package, you will need:
* ocaml (>= 3.12.1)
* ocaml (>= 3.12.1) for all, doc async_extra
* findlib (>= 1.2.7)
* sexplib
* fieldslib
Expand Down
4 changes: 2 additions & 2 deletions THIRD-PARTY.txt
Expand Up @@ -2,8 +2,8 @@ The repository contains 3rd-party code in the following locations and
under the following licenses:

- type_conv, sexplib and bin_prot: based on Tywith, by Martin
Sandin. License can be found in base/sexplib/LICENSE.Tywith,
base/type_conv/LICENSE.Tywith, and base/bin_prot/LICENSE.Tywith.
Sandin. License can be found in base/sexplib/LICENSE-Tywith.txt,
base/type_conv/LICENSE-Tywith.txt, and base/bin_prot/LICENSE-Tywith.txt.

- Core's implementation of union-find: based on an implementation by
Henry Matthew Fluet, Suresh Jagannathan, and Stephen Weeks. License
Expand Down
12 changes: 10 additions & 2 deletions _oasis
Expand Up @@ -3,7 +3,7 @@
OASISFormat: 0.3
OCamlVersion: >= 3.12.1
Name: async_extra
Version: 108.00.02
Version: 108.07.00
Synopsis: Jane Street Capital's asynchronous execution library (extra)
Authors: Jane street capital
Copyrights: (C) 2008-2011 Jane Street Capital LLC
Expand All @@ -20,7 +20,7 @@ Library async_extra
Path: lib
FindlibName: async_extra
Pack: true
Modules: Async_gc,File_tail,File_writer,Import,Lock_file,Persistent_singleton,Rpc,Std,Tcp,Tcp_file,Typed_tcp,Typed_tcp_intf,Unpack_sequence,Versioned_rpc,Versioned_typed_tcp
Modules: File_tail,File_writer,Import,Inline_tests,Lock_file,Log,Persistent_singleton,Rpc,Rpc_intf,Std,Tcp,Tcp_file,Typed_tcp,Typed_tcp_intf,Unpack_sequence,Versioned_rpc,Versioned_typed_tcp,Weak_hashtbl
BuildDepends: sexplib.syntax,
sexplib,
fieldslib.syntax,
Expand All @@ -34,3 +34,11 @@ Library async_extra
async_unix,
threads

Document "async_extra"
Title: Jane street's async library (extra)
Type: ocamlbuild (0.3)
BuildTools+: ocamldoc
XOCamlbuildPath: lib
XOCamlbuildLibraries: async_extra


7 changes: 5 additions & 2 deletions _tags
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 0e1d7b37b0322ac75d655d4a0639b1dd)
# DO NOT EDIT (digest: aab4fdec0378958f3592da4af8802135)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
Expand All @@ -15,13 +15,15 @@
"_darcs": not_hygienic
# Library async_extra
"lib/async_extra.cmxs": use_async_extra
"lib/async_gc.cmx": for-pack(Async_extra)
"lib/file_tail.cmx": for-pack(Async_extra)
"lib/file_writer.cmx": for-pack(Async_extra)
"lib/import.cmx": for-pack(Async_extra)
"lib/inline_tests.cmx": for-pack(Async_extra)
"lib/lock_file.cmx": for-pack(Async_extra)
"lib/log.cmx": for-pack(Async_extra)
"lib/persistent_singleton.cmx": for-pack(Async_extra)
"lib/rpc.cmx": for-pack(Async_extra)
"lib/rpc_intf.cmx": for-pack(Async_extra)
"lib/std.cmx": for-pack(Async_extra)
"lib/tcp.cmx": for-pack(Async_extra)
"lib/tcp_file.cmx": for-pack(Async_extra)
Expand All @@ -30,6 +32,7 @@
"lib/unpack_sequence.cmx": for-pack(Async_extra)
"lib/versioned_rpc.cmx": for-pack(Async_extra)
"lib/versioned_typed_tcp.cmx": for-pack(Async_extra)
"lib/weak_hashtbl.cmx": for-pack(Async_extra)
<lib/*.ml{,i}>: pkg_sexplib.syntax
<lib/*.ml{,i}>: pkg_sexplib
<lib/*.ml{,i}>: pkg_fieldslib.syntax
Expand Down
4 changes: 2 additions & 2 deletions lib/META
@@ -1,6 +1,6 @@
# OASIS_START
# DO NOT EDIT (digest: 16bb76010e625ee5977ad3f570ed8fb5)
version = "108.00.02"
# DO NOT EDIT (digest: 7dc9390403479b238f2c241195e10dfe)
version = "108.07.00"
description = "Jane Street Capital's asynchronous execution library (extra)"
requires =
"sexplib.syntax sexplib fieldslib.syntax fieldslib bin_prot bin_prot.syntax pa_ounit pa_pipebang core async_core async_unix threads"
Expand Down
7 changes: 5 additions & 2 deletions lib/async_extra.mlpack
@@ -1,12 +1,14 @@
# OASIS_START
# DO NOT EDIT (digest: 0cf81b43b1f1f4b1f03e5002b6ff2e81)
Async_gc
# DO NOT EDIT (digest: 00ac48f12646d5ad2cfdad7857723c0f)
File_tail
File_writer
Import
Inline_tests
Lock_file
Log
Persistent_singleton
Rpc
Rpc_intf
Std
Tcp
Tcp_file
Expand All @@ -15,4 +17,5 @@ Typed_tcp_intf
Unpack_sequence
Versioned_rpc
Versioned_typed_tcp
Weak_hashtbl
# OASIS_STOP
21 changes: 21 additions & 0 deletions lib/async_extra.odocl
@@ -0,0 +1,21 @@
# OASIS_START
# DO NOT EDIT (digest: 00ac48f12646d5ad2cfdad7857723c0f)
File_tail
File_writer
Import
Inline_tests
Lock_file
Log
Persistent_singleton
Rpc
Rpc_intf
Std
Tcp
Tcp_file
Typed_tcp
Typed_tcp_intf
Unpack_sequence
Versioned_rpc
Versioned_typed_tcp
Weak_hashtbl
# OASIS_STOP
14 changes: 0 additions & 14 deletions lib/async_gc.ml

This file was deleted.

12 changes: 5 additions & 7 deletions lib/file_tail.ml
Expand Up @@ -63,7 +63,7 @@ end
module Chunker : sig
(** A chunker is used to convert the incoming strings of data into a sequence of
updates. One creates a chunker, and then repeatedly [feed]s it data. *)
type t
type t with sexp_of

val invariant : t -> unit
val create : break_on_lines:bool -> t
Expand Down Expand Up @@ -172,10 +172,9 @@ type t =
each time we reach EOF. *)
mutable need_to_report_eof : bool;
}
with fields
with fields, sexp_of

(*
let invariant t =
let _invariant t =
try
Chunker.invariant t.chunker;
assert Int64.(t.file_len >= zero);
Expand All @@ -185,7 +184,6 @@ let invariant t =
and the time we read. *)
with exn -> failwiths "invariant failed" (exn, t) <:sexp_of< exn * t >>
;;
*)

let need_to_read t = t.file_pos < t.file_len

Expand All @@ -198,12 +196,12 @@ let write t updates =
Deferred.unit
;;

let warning t w = whenever (write t (Queue.singleton (Update.Warning (t.file, w))))
let warning t w = don't_wait_for (write t (Queue.singleton (Update.Warning (t.file, w))))

let error t e =
(* We want to be sure that [t] will be closed when this function returns, so we don't
wait on the pipe to flush before calling [Pipe.close]. *)
whenever (write t (Queue.singleton (Update.Error (t.file, e))));
don't_wait_for (write t (Queue.singleton (Update.Error (t.file, e))));
Pipe.close t.pipe_w;
;;

Expand Down
6 changes: 3 additions & 3 deletions lib/file_tail.mli
Expand Up @@ -103,9 +103,9 @@ end
val create :
?read_buf_len:int (* default 32k *)
-> ?read_delay:Time.Span.t (* default 0.5s *)
-> ?retry_null_reads:bool (* default [true] *)
-> ?break_on_lines:bool (* default [true] *)
-> ?ignore_inode_change:bool (* default [false] *)
-> ?retry_null_reads:bool (* defaults to true *)
-> ?break_on_lines:bool (* defaults to true *)
-> ?ignore_inode_change:bool (* defaults to false *)
-> ?start_at:[ `Beginning | `End | `Pos of Int64.t ] (* default [`Beginning] *)
-> ?eof_latency_tolerance:Time.Span.t (* default 5s *)
-> ?null_read_tolerance:Time.Span.t (* default 0s *)
Expand Down
2 changes: 1 addition & 1 deletion lib/file_writer.ml
Expand Up @@ -48,7 +48,7 @@ let schedule_bigstring t ss =

let create ?(append = true) file =
let monitor =
Monitor.create ~name:(sprintf "Async.File_writer on file %s" file) ()
Monitor.create ~info:(Info.create "Async.File_writer" file <:sexp_of< string >>) ()
in
within' ~monitor (fun () ->
Deferred.create
Expand Down
4 changes: 2 additions & 2 deletions lib/file_writer.mli
Expand Up @@ -13,7 +13,7 @@ open Import
type t with sexp_of

(** [create file] opens [file], creating it if it doesn't exist. *)
val create : ?append:bool (* default true *) -> string -> t Deferred.t
val create : ?append:bool (* defaults to true *) -> string -> t Deferred.t

(** [write t s] writes [s] to the file. *)
val write : t -> string -> unit
Expand All @@ -24,7 +24,7 @@ val schedule_bigstring : t -> Bigstring.t -> unit

val write_bin_prot : t -> 'a Bin_prot.Type_class.writer -> 'a -> unit

val write_sexp : ?hum:bool -> t -> Sexp.t -> unit
val write_sexp : ?hum:bool (* defaults to false *) -> t -> Sexp.t -> unit

val monitor : t -> Monitor.t

Expand Down
23 changes: 23 additions & 0 deletions lib/inline_tests.ml
@@ -0,0 +1,23 @@
(* This file was autogenerated; don't edit it by hand *)

let tests () = OUnit.TestList [
File_tail.ounit_tests ();
File_writer.ounit_tests ();
Import.ounit_tests ();
Lock_file.ounit_tests ();
Log.ounit_tests ();
Persistent_singleton.ounit_tests ();
Rpc.ounit_tests ();
Rpc_intf.ounit_tests ();
Std.ounit_tests ();
Tcp.ounit_tests ();
Tcp_file.ounit_tests ();
Typed_tcp.ounit_tests ();
Typed_tcp_intf.ounit_tests ();
Unpack_sequence.ounit_tests ();
Versioned_rpc.ounit_tests ();
Versioned_typed_tcp.ounit_tests ();
Weak_hashtbl.ounit_tests ();
];;

let run () = ignore (OUnit.run_test_tt_main (tests ()):OUnit.test_result list)
12 changes: 6 additions & 6 deletions lib/lock_file.mli
Expand Up @@ -6,26 +6,26 @@ open Import
the process dies.*)
val create
: ?message:string
-> ?close_on_exec : bool
-> ?unlink_on_exit : bool
-> ?close_on_exec : bool (* defaults to true *)
-> ?unlink_on_exit : bool (* defaults to false *)
-> string
-> bool Deferred.t

(** [create_exn ?message path] is like [create] except that it throws an exception on
failure instead of returning a boolean value *)
val create_exn
: ?message:string
-> ?close_on_exec : bool
-> ?unlink_on_exit : bool
-> ?close_on_exec : bool (* defaults to true *)
-> ?unlink_on_exit : bool (* defaults to false *)
-> string
-> unit Deferred.t

(** [wait_create ~path ~message] becomes determined when the file at [path] gets locked.
Equivalent to [Core.Std.Lock_file.blocking_create]. *)
val waiting_create
: ?message:string
-> ?close_on_exec : bool
-> ?unlink_on_exit : bool
-> ?close_on_exec : bool (* defaults to true *)
-> ?unlink_on_exit : bool (* defaults to false *)
-> string
-> unit Deferred.t

Expand Down

0 comments on commit 1285cdc

Please sign in to comment.