Caml1999I037kxa.Stdlib__Domain!t#;!a@@A@A@O@B@@@*domain.mli]]@@@@@@A@%spawn$@@$unitF@@@!a@@@&@@@@@@aSSaSs@@/A@@$join%@!a@@@@@@@0h**1h*?@@BB@@"id&;@@@@#intA@@@@@@@Am  Bm !@@A@SC@A@&get_id'@4!a@@@@!@@@@@@XpRRYpRi@@jD@@$self(@U@@@@@@@@@jsks@@|E@@2before_first_spawn)@@i@@@m@@@@@q@@@@@@v  v  /@@F@@'at_exit*@@@@@@@@@@@@@@@@    @@G@@)cpu_relax+@@@@@@@@@@Q  Q @@H@@.is_main_domain,@@@@$boolE@@@@@@UU@@I@@8recommended_domain_count-@@@@@@@@@@XX'@@J@@*self_index.@@@@@@@@@@^^@@K@@Ӡ#DLS/@#key0;!a@@A@A@G@B@@@mm@@@@L@A@'new_key11split_from_parent&optionL@!a@@@@@@@@@@@ @@0@@@@@@@@(p)p)@@:M@@#get2@!a@@@@@@@;<@@MN@@#set3@#!a@@@@@B@@@@@@@@TU@@fO@@@@XjY@jP@@@@l:..Stdlib__Domain0:M;׉<O$Ġ&Stdlib0Lku]8_٠8CamlinternalFormatBasics0%FU(Q/Tu@U!@(unstable CThe Domain interface may change in incompatible ways in the future.@A@Caml1999T037R"*^$C.Stdlib__Domain*ocaml.text&_none_@@A Q Domains. See 'Parallel programming' chapter in the manual. @since 5.0 *domain.mliSWct@@@@@@3@@@@@@#intA;@@@A@@@@@:@A@$charB;@@A@@@@@>@A@&stringQ;@@ A@@@@@B@@@%bytesC;@@ A@@@@@F@@@%floatD;@@A@@@@@J@@@$boolE;@@%falsec@@T@$trued@@Z@@@A@@@@@[@A@$unitF;@@"()e@@e@@@A@@@@@f@A@ #exnG;@@@A@@@@@j@@@#effH;@@O@A@A@@@@@@s@@@,continuationI;@@Q@@P@B@A@nY@@@@@@@@@%arrayJ;@@R@A@A@@@@@@@@@ $listK;@@S@A"[]f@@@"::g@@@T@@@ @@A@Y@@@@@@@@&optionL;@@V@A$Noneh@@@$Somei@@@@@A@Y@@@@@@@@)nativeintM;@@A@@@@@@@@%int32N;@@A@@@@@@@@%int64O;@@A@@@@@@@@&lazy_tP;@@X@AJA@Y@@@@@@@@5extension_constructorR;@@A@@@@@@@@*floatarrayS;@@A@@@@@@@@&iarrayT;@@Y@A[A@Y@@@@@@@@*atomic_locU;@@Z@AdA@@@@@@@@@.Assert_failure`#@@@@@J@@@@@@@@[@@A=ocaml.warn_on_literal_pattern @ @0Division_by_zero]#@@@A  @+End_of_file\#$@@@A@'FailureY#,@'@@A!$$@0Invalid_argumentX#5@0@@A*$-#-@-Match_failureV#>@@=@9@;@@a@@A;5>4>@)Not_foundZ#O@@@AC=F<F@-Out_of_memoryW#W@@@AKENDN@.Stack_overflow^#_@@@ASMVLV@.Sys_blocked_io_#g@@@A[U^T^@)Sys_error[#o@j@@Ad^g]g@:Undefined_recursive_modulea#x@@w@s@u@@h@@Auoxnx@:Continuation_already_takenb#@@@A}wv@&Stdlib@Ax%alert~YvzYv@(unstableYvYv@@@@@ CThe Domain interface may change in incompatible ways in the future.ZZ@@ZZ@@@@@@@@@@Yvv[@@A+!tA]]@А!a@3@;@@@A@A@G@B@@@]@)ocaml.docѐ k A domain of type ['a t] runs independently, eventually producing a result of type 'a, or an exception ^_(Q@@@@@@@@@@@@A]]@@B@@;%@A@A@O@B@@@@@ @@A@ꐠ@@@@@@@':@%spawnaSWaS\@б@б@г$unitaS`aSd@@ @@@3@[-@A@@А!a@B@  aSh aSj@@@ @@@@гm!taSraSs@А!aaSo aSq@@@@@@% @@@@@()aS_@@@,aSS@m [spawn f] creates a new domain that runs in parallel with the current domain. @raise Failure if the program has insufficient resources to create another domain. 9btt:f(@@@@@@@RA@@$@}M@@@@@@H$joinPh*.Qh*2@б@г!t[h*8\h*9@А!a@B@3cbbccccc@g~>@Aih*5jh*7@@@ @@@ @@А!a th*=uh*?@@@ @@@@@{h**@ [join d] blocks until domain [d] runs to completion. If [d] results in a value, then that is returned by [join d]. If [d] raises an uncaught exception, then that is re-raised by [join d]. i@@k @@@@@@@B@@@@@@@@@1A+"idBm m @@;@@@~@@@@@@@m  m !@될 ) Domains have unique integer identifiers n""n"P@@@@@@@A@C@@@@г#intm @@3@^yL);@@@@1@@@@@@@@&#@@@A%@@'ߐ%$@$$@@@$@$@@3@@A32@&get_idpRVpR\@б@гD!tpRbpRc@А!a@C@3@8`Z@ApR_pRa@@@ @@@ @@гk"id pRg pRi@@ @@@@@@@@@@@pRR @W 5 [get_id d] returns the identifier of the domain [d] #qjj$qj@@@@@@@ let tmp = snd (Filename.open_temp_file "" "") in Domain.at_exit (fun () -> close_out_noerr tmp); tmp) ]} The snippet above creates a key that when retrieved for the first time will open a temporary file and register an [at_exit] callback to close it, thus guaranteeing the descriptor is not leaked in case the current domain exits. $@  %O  @@@@@@@=G@@@h8@@@@@@B)cpu_relax;Q  <Q @б@г$unitFQ  GQ @@ @@@3HGGHHHHH@[r8@A@@г$unitUQ VQ @@ @@@@@@@@@@@`Q   @ q If busy-waiting, calling cpu_relax () between iterations will improve performance on some CPU architectures mRnST@@@@@@@H@@@@@@@@@1.is_main_domainUU@б@г<$unitUU@@ @@@3@J_8@A@@г\$boolUU@@ @@@@@@@@@@@U @ꐠ E [is_main_domain ()] returns true if called from the initial domain. VV@@@@@@@I@@@ʐ@@@@@@18recommended_domain_countXX@б@г$unitXX @@ @@@3@J_8@A@@г#intX$X'@@ @@@@@@@@@@@X @3 The recommended maximum number of domains which should be running simultaneously (including domains already running). The value returned is at least [1]. Y((\@@@@@@@J@@@C@@@@@@1*self_index^^@б@гΠ$unit!^"^@@ @@@3#""#####@J_8@A@@г#int0^1^@@ @@@@@@@@@@@;^ @|  The index of the current domain. It is an integer unique among currently-running domains, in the interval [0; N-1] where N is the peak number of domains running simultaneously so far. The index of a terminated domain may be reused for a new domain. Use [(Domain.self () :> int)] instead for an identifier unique among all domains ever created by the program. @since 5.3 H_Ih@@@@@@@aK@@@\@@@@@@1#DLS"Cajbj@zP@@Бzy6 Domain-local Storage vkwk@@@@@@3uttuuuuu@ShA@AA+#keyDmm@А!a@3@;@@@A@A@G@B@@@m@ؐ3 Type of a DLS key nn@@@@@@@@@L@@Amm@@BA@;#@AA@G@B@@@@@ @@A@@@@@@@@B$7@'new_keypp@б1split_from_parentб@А!a@E@3@\V*@App@@А!a p p@@@@@  @@б@б@г$unitpp@@ @@@@@А!a'"pp@@@ ,@@'@@г#keyp&p)@А!a:5 p# p%@@@@@@@< @@@@@?p@@O|<@@@ @@Hp@@ @p@`  [new_key f] returns a new key bound to initialiser [f] for accessing domain-local variables. If [split_from_parent] is not provided, the value for a new domain will be computed on-demand by the new domain: the first [get] call will call the initializer [f] and store that value. {b Warning.} [f] may be called several times if another call to [get] occurs during initialization on the same domain. Only the 'first' value computed will be used, the other now-useless values will be discarded. Your initialization function should support this situation, or contain logic to detect this case and fail. If [split_from_parent] is provided, spawning a domain will derive the child value (for this key) from the parent value. This computation happens in the parent domain and it always happens, regardless of whether the child domain will use it. If the splitting function is expensive or requires child-side computation, consider using ['a Lazy.t key]: {[ let init () = ... let split_from_parent parent_value = ... parent-side computation ...; lazy ( ... child-side computation ... ) let key = Domain.DLS.new_key ~split_from_parent init let get () = Lazy.force (Domain.DLS.get key) ]} In this case a part of the computation happens on the child domain; in particular, it can access [parent_value] concurrently with the parent domain, which may require explicit synchronization to avoid data races. ,q*.-@@@@@@@EM@@-@p@@@@@@@h#get CD@б@гˠ#keyNO@А!a@E@3VUUVVVVV@>@A\]@@@ @@@ @@А!a gh@@@ @@@@@n@ [get k] returns [v] if a value [v] is associated to the key [k] on the calling domain's domain-local state. Sets [k]'s value with its initialiser and returns it otherwise. {|e@@@@@@@N@@@@@@@@@1#set!@б@г#key@А!a@E@3@Pk>@A@@@ @@@ @@б@А!a@@гn$unit@@ @@@@@@&@@!@@@@@$" @@@@ [set k v] updates the calling domain's domain-local state to associate the key [k] with value [v]. It overwrites any previous values associated to [k], which cannot be restored later. Z@@@@@@@O@@@ 𐠠@@@@@@C@nBA@0@@e&@@3@Lg(@A 3@~@Aj@@@j@@@X*A@@@icA@'@@R@2@@j@J#@@@#@@@@3@@sA@a@@W@@@*@A@ H************************************************************************(A@@)A@L@ H .BMM/BM@ H OCaml 4C5C@ H :D;D3@ H KC Sivaramakrishnan, Indian Institute of Technology, Madras @E44AE4@ H Stephen Dolan, University of Cambridge FFGF@ H Tom Kelly, OCaml Labs Consultancy LGMG@ H RHSHg@ H Copyright 2019 Indian Institute of Technology, Madras XIhhYIh@ H Copyright 2014 University of Cambridge ^J_J@ H Copyright 2021 OCaml Labs Consultancy Ltd dKeKN@ H jLOOkLO@ H All rights reserved. This file is distributed under the terms of pMqM@ H the GNU Lesser General Public License version 2.1, with the vNwN5@ H special exception on linking described in the file LICENSE. |O66}O6@ H PP@ H************************************************************************QQ@ R* Domains. See 'Parallel programming' chapter in the manual. @since 5.0  l* A domain of type ['a t] runs independently, eventually producing a result of type 'a, or an exception à * [spawn f] creates a new domain that runs in parallel with the current domain. @raise Failure if the program has insufficient resources to create another domain. [ * [join d] blocks until domain [d] runs to completion. If [d] results in a value, then that is returned by [join d]. If [d] raises an uncaught exception, then that is re-raised by [join d].  ** Domains have unique integer identifiers 㠠 6* [get_id d] returns the identifier of the domain [d] z >* [self ()] is the identifier of the currently running domain 4 * [before_first_spawn f] registers [f] to be called before the first domain is spawned by the program. The functions registered with [before_first_spawn] are called on the main (initial) domain. The functions registered with [before_first_spawn] are called in 'first in, first out' order: the oldest function added with [before_first_spawn] is called first. @raise Invalid_argument if the program has already spawned a domain. ۠ * [at_exit f] registers [f] to be called when the current domain exits. Note that [at_exit] callbacks are domain-local and only apply to the calling domain. The registered functions are called in 'last in, first out' order: the function most recently added with [at_exit] is called first. An example: {[ let temp_file_key = Domain.DLS.new_key (fun _ -> let tmp = snd (Filename.open_temp_file "" "") in Domain.at_exit (fun () -> close_out_noerr tmp); tmp) ]} The snippet above creates a key that when retrieved for the first time will open a temporary file and register an [at_exit] callback to close it, thus guaranteeing the descriptor is not leaked in case the current domain exits.  r* If busy-waiting, calling cpu_relax () between iterations will improve performance on some CPU architectures < F* [is_main_domain ()] returns true if called from the initial domain.  * The recommended maximum number of domains which should be running simultaneously (including domains already running). The value returned is at least [1].  * The index of the current domain. It is an integer unique among currently-running domains, in the interval [0; N-1] where N is the peak number of domains running simultaneously so far. The index of a terminated domain may be reused for a new domain. Use [(Domain.self () :> int)] instead for an identifier unique among all domains ever created by the program. @since 5.3 j7* Domain-local Storage ?4* Type of a DLS key  * [new_key f] returns a new key bound to initialiser [f] for accessing domain-local variables. If [split_from_parent] is not provided, the value for a new domain will be computed on-demand by the new domain: the first [get] call will call the initializer [f] and store that value. {b Warning.} [f] may be called several times if another call to [get] occurs during initialization on the same domain. Only the 'first' value computed will be used, the other now-useless values will be discarded. Your initialization function should support this situation, or contain logic to detect this case and fail. If [split_from_parent] is provided, spawning a domain will derive the child value (for this key) from the parent value. This computation happens in the parent domain and it always happens, regardless of whether the child domain will use it. If the splitting function is expensive or requires child-side computation, consider using ['a Lazy.t key]: {[ let init () = ... let split_from_parent parent_value = ... parent-side computation ...; lazy ( ... child-side computation ... ) let key = Domain.DLS.new_key ~split_from_parent init let get () = Lazy.force (Domain.DLS.get key) ]} In this case a part of the computation happens on the child domain; in particular, it can access [parent_value] concurrently with the parent domain, which may require explicit synchronization to avoid data races.  * [get k] returns [v] if a value [v] is associated to the key [k] on the calling domain's domain-local state. Sets [k]'s value with its initialiser and returns it otherwise. C * [set k v] updates the calling domain's domain-local state to associate the key [k] with value [v]. It overwrites any previous values associated to [k], which cannot be restored later. @?)../ocamlc0-strict-sequence(-absname"-w5+a-4-9-41-42-44-45-48"-g+-warn-error"+A*-bin-annot)-nostdlib*-principal"-o2stdlib__Domain.cmi"-cΐ D/builds/workspace/precheck/flambda/false/label/ocaml-linux-32/stdlib @@0D]F[y43@@@8CamlinternalFormatBasics0%FU(Q/Tu&Stdlib0Lku]8_٠0:M;׉<O$@0:M;׉<O$AQCDm@@&s@:t;Z@@&Q@{@̐=@pɰې"@x@@=@@1@@@@P@@