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 committed Jan 15, 2014
1 parent c21c7fa commit a11dd40
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 @@ -16,9 +16,11 @@ module Run = struct
open LocalCompiler.RunTime

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 a11dd40

Please sign in to comment.