Skip to content

Commit

Permalink
async: Increase file descriptor limit for async
Browse files Browse the repository at this point in the history
The file descriptor limit seems to be set to 1024 by async. This commit
makes katnetic use a different entry point for the scheduler, which
allows the user to configure the maximum number of file descriptors.

Related to frenetic-lang/ocaml-openflow#70.
  • Loading branch information
seliopou authored and Marco Canini committed Jan 15, 2014
1 parent fd53717 commit 2d9f496
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frenetic/katnetic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ module Run = struct
open LocalCompiler

let with_channel f chan =
let open Core.Std in
let open Async.Std in
let exp = Parser.program Lexer.token (Lexing.from_channel chan) in
let _ = Async_Controller.start_static f 6633 exp in
Core.Std.never_returns (Async.Std.Scheduler.go ())
let main () = ignore (Async_Controller.start_static f 6633 exp) in
never_returns (Scheduler.go_main ~max_num_open_file_descrs:4096 ~main ())

let with_file f filename =
with_channel f (open_in filename)
Expand Down

0 comments on commit 2d9f496

Please sign in to comment.