Skip to content

Commit

Permalink
Don't refer to caml_ml_domain_id on OCaml 4
Browse files Browse the repository at this point in the history
See #332

Co-authored-by: Hugo Heuzard <[email protected]>
  • Loading branch information
polytypic and hhugo committed Nov 24, 2024
1 parent 6d64d24 commit 2c09e0a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/picos.thread/thread.ocaml4.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ function caml_thread_initialize(unit) {
var caml_thread = [0, 0, 0, 0]

//Provides: caml_thread_self
//Requires: caml_ml_domain_id, caml_failwith, caml_thread
//Requires: caml_thread
function caml_thread_self(unit) {
if (caml_ml_domain_id(unit) != caml_thread[1])
caml_failwith('caml_thread_self: spawning of domains is not supported')
// There are no threads other than the main thread.
return caml_thread
}

Expand Down

0 comments on commit 2c09e0a

Please sign in to comment.