Created
July 23, 2020 08:32
-
-
Save Sudha247/0fc272109d7b06e5f6fd2585062f9711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let num_domains = try int_of_string Sys.argv.(1) with _ -> 1 | |
open Domain.DLS | |
let chk () = | |
let k1 : int key = new_key () in | |
set k1 100; | |
Gc.major (); | |
Printf.printf "%d\n" (Option.get @@ get k1) | |
let _ = | |
let domains = Array.init num_domains (fun _ -> Domain.spawn(chk)) in | |
Array.iter Domain.join domains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment