Skip to content

Commit

Permalink
Merge pull request #971 from Sudha247/domainslib.0.5.0
Browse files Browse the repository at this point in the history
Lwt_domain: update to domainslib.0.5.0
  • Loading branch information
raphael-proust authored Nov 3, 2022
2 parents 5907991 + f79d25f commit 3d6f0fa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ jobs:
local-packages: |
*.opam
!lwt_domain.opam
- os: ubuntu-latest
ocaml-compiler: ocaml-variants.4.12.0+domains
libev: false
ppx: true
domain: true
local-packages: "*.opam"
- os: macos-latest
ocaml-compiler: 4.14.x
libev: true
Expand Down
2 changes: 1 addition & 1 deletion lwt_domain.opam
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ depends: [
"dune" {>= "1.8.0"}
"lwt" {>= "3.0.0"}
"ocaml" {>= "4.08"}
"domainslib" {>= "0.3.2"}
"domainslib" {>= "0.5.0"}
"base-domains"
]

Expand Down
4 changes: 2 additions & 2 deletions src/domain/lwt_domain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ module T = Domainslib.Task

type pool = Domainslib.Task.pool

let setup_pool ?name num_additional_domains =
T.setup_pool ?name ~num_additional_domains ()
let setup_pool ?name num_domains =
T.setup_pool ?name ~num_domains ()

let teardown_pool = T.teardown_pool

Expand Down
4 changes: 2 additions & 2 deletions src/domain/lwt_domain.mli
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
is recommended to use this function sparingly. *)

val setup_pool : ?name:string -> int -> pool
(** [setup_pool name num_additional_domains] returns a task pool with
[num_additional_domains] domains including the current domain.
(** [setup_pool name num_domains] returns a task pool with
[num_domains] new domains.
It is recommended to use this function to create a pool once before
calling [Lwt_main.run] and to not call it again afterwards. To resize the
Expand Down
2 changes: 1 addition & 1 deletion test/domain/test_lwt_domain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ let lwt_domain_test = [
(fun _ -> Lwt.return_false)
(fun exn ->
Lwt.return (exn = Invalid_argument
"Task.setup_pool: num_additional_domains must be at least 0"))
"Task.setup_pool: num_domains must be at least 0"))
end;
test "detach_exception" begin fun () ->
let pool = Option.get (Lwt_domain.lookup_pool "pool_1") in
Expand Down

0 comments on commit 3d6f0fa

Please sign in to comment.