mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
deprecate containers.thread
This commit is contained in:
parent
ad10cdc9d5
commit
61887100ae
9 changed files with 21 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ version: "3.12"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "BSD-2-Clause"
|
license: "BSD-2-Clause"
|
||||||
synopsis: "An extension of containers for threading"
|
synopsis: "An extension of containers for threading. DEPRECATED: use moonpool, domainslib, etc."
|
||||||
build: [
|
build: [
|
||||||
["dune" "build" "-p" name "-j" jobs]
|
["dune" "build" "-p" name "-j" jobs]
|
||||||
["dune" "build" "@doc" "-p" name ] {with-doc}
|
["dune" "build" "@doc" "-p" name ] {with-doc}
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ let hash (n : int) : int =
|
||||||
(* h := h xor (k-th byte of n) *)
|
(* h := h xor (k-th byte of n) *)
|
||||||
h := Int64.(logxor !h (of_int ((n lsr (k * 8)) land 0xff)))
|
h := Int64.(logxor !h (of_int ((n lsr (k * 8)) land 0xff)))
|
||||||
done;
|
done;
|
||||||
|
(* truncate back to int and remove sign *)
|
||||||
Int64.to_int !h land max_int
|
Int64.to_int !h land max_int
|
||||||
(* truncate back to int and remove sign *)
|
|
||||||
|
|
||||||
let range i j yield =
|
let range i j yield =
|
||||||
let rec up i j yield =
|
let rec up i j yield =
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
@since 0.16 *)
|
@since 0.16 *)
|
||||||
|
|
||||||
|
[@@@deprecated
|
||||||
|
"use moonpool or domainslib or saturn, libraries designed for multicore"]
|
||||||
|
|
||||||
type 'a t
|
type 'a t
|
||||||
(** Safe-thread queue for values of type ['a] *)
|
(** Safe-thread queue for values of type ['a] *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@
|
||||||
|
|
||||||
@since 0.8 *)
|
@since 0.8 *)
|
||||||
|
|
||||||
|
[@@@deprecated
|
||||||
|
"use moonpool or domainslib or saturn, libraries designed for multicore"]
|
||||||
|
|
||||||
type 'a t
|
type 'a t
|
||||||
(** A value surrounded with a lock *)
|
(** A value surrounded with a lock *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
Renamed and heavily updated from [CCFuture].
|
Renamed and heavily updated from [CCFuture].
|
||||||
@since 0.16 *)
|
@since 0.16 *)
|
||||||
|
|
||||||
|
[@@@deprecated
|
||||||
|
"use moonpool or domainslib or saturn, libraries designed for multicore"]
|
||||||
|
|
||||||
type +'a state = Done of 'a | Waiting | Failed of exn
|
type +'a state = Done of 'a | Waiting | Failed of exn
|
||||||
|
|
||||||
module type PARAM = sig
|
module type PARAM = sig
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
@since 0.13 *)
|
@since 0.13 *)
|
||||||
|
|
||||||
|
[@@@deprecated "use the stdlib's Semaphore module"]
|
||||||
|
|
||||||
type t
|
type t
|
||||||
(** A semaphore *)
|
(** A semaphore *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
{b status: unstable}
|
{b status: unstable}
|
||||||
@since 0.13 *)
|
@since 0.13 *)
|
||||||
|
|
||||||
|
[@@@deprecated
|
||||||
|
"use moonpool or domainslib or saturn, libraries designed for multicore"]
|
||||||
|
|
||||||
type t = Thread.t
|
type t = Thread.t
|
||||||
|
|
||||||
val spawn : (unit -> _) -> t
|
val spawn : (unit -> _) -> t
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
Used to be part of [CCFuture].
|
Used to be part of [CCFuture].
|
||||||
@since 0.16 *)
|
@since 0.16 *)
|
||||||
|
|
||||||
|
[@@@deprecated
|
||||||
|
"use moonpool or domainslib or saturn, libraries designed for multicore"]
|
||||||
|
|
||||||
type t
|
type t
|
||||||
(** A scheduler for events. It runs in its own thread. *)
|
(** A scheduler for events. It runs in its own thread. *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
(library
|
(library
|
||||||
(name containers_thread)
|
(name containers_thread)
|
||||||
(public_name containers-thread)
|
(public_name containers-thread)
|
||||||
|
(synopsis "DEPRECATED library for threading")
|
||||||
(wrapped false)
|
(wrapped false)
|
||||||
(optional)
|
(optional)
|
||||||
(flags :standard -warn-error -a+8 -w -32 -safe-string)
|
(flags :standard -warn-error -a+8 -w -32 -safe-string)
|
||||||
|
|
@ -8,3 +9,4 @@
|
||||||
(action
|
(action
|
||||||
(run %{project_root}/src/core/cpp/cpp.exe %{input-file})))
|
(run %{project_root}/src/core/cpp/cpp.exe %{input-file})))
|
||||||
(libraries containers threads))
|
(libraries containers threads))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue