diff --git a/examples/crawl.ml b/examples/crawl.ml index 5bb06157..bfe8496d 100644 --- a/examples/crawl.ml +++ b/examples/crawl.ml @@ -3,7 +3,7 @@ open Batteries -let pool = Future.Pool.create ~timeout:15. ~size:15 +let pool = Future.Pool.create ~timeout:15. ~size:50 let split_lines s = String.nsplit s ~by:"\n" @@ -50,6 +50,13 @@ let main from into = with Not_found -> Format.printf "no path could be found@." +let _ = + let timer = Future.Timer.create () in + let rec ping () = + Format.printf "*** ping! (size of pool: %d)@." (Future.Pool.size pool); + Future.Timer.schedule_in timer 10. ping + in ping () + let _ = if Array.length Sys.argv < 3 then Format.printf "usage: crawl url1 url2"