mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 19:55:31 -05:00
make some tests a bit faster
This commit is contained in:
parent
ef4c86d8a1
commit
6ccad958c4
2 changed files with 5 additions and 5 deletions
|
|
@ -264,7 +264,7 @@ module Make(P : PARAM) = struct
|
||||||
let l = List.rev_map (fun i ->
|
let l = List.rev_map (fun i ->
|
||||||
Fut.make
|
Fut.make
|
||||||
(fun () ->
|
(fun () ->
|
||||||
Thread.delay 0.1;
|
Thread.delay 0.05;
|
||||||
1
|
1
|
||||||
)) l in
|
)) l in
|
||||||
let l' = List.map Fut.get l in
|
let l' = List.map Fut.get l in
|
||||||
|
|
|
||||||
|
|
@ -184,12 +184,12 @@ let stop timer =
|
||||||
let timer = create () in
|
let timer = create () in
|
||||||
let n = CCLock.create 1 in
|
let n = CCLock.create 1 in
|
||||||
let res = CCLock.create 0 in
|
let res = CCLock.create 0 in
|
||||||
after timer 0.6
|
after timer 0.3
|
||||||
~f:(fun () -> CCLock.update n (fun x -> x+2));
|
~f:(fun () -> CCLock.update n (fun x -> x+2));
|
||||||
ignore (Thread.create
|
ignore (Thread.create
|
||||||
(fun _ -> Thread.delay 0.8; CCLock.set res (CCLock.get n)) ());
|
(fun _ -> Thread.delay 0.4; CCLock.set res (CCLock.get n)) ());
|
||||||
after timer 0.4
|
after timer 0.2
|
||||||
~f:(fun () -> CCLock.update n (fun x -> x * 4));
|
~f:(fun () -> CCLock.update n (fun x -> x * 4));
|
||||||
Thread.delay 1. ;
|
Thread.delay 0.6 ;
|
||||||
OUnit.assert_equal 6 (CCLock.get res);
|
OUnit.assert_equal 6 (CCLock.get res);
|
||||||
*)
|
*)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue