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