Skip to content

Commit

Permalink
Pass runloop as dereffed-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
actionshrimp committed Apr 18, 2018
1 parent ee45d53 commit 77510e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/backend_osx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ let make_watcher

Lwt.async (fun () -> Lwt_stream.iter_s !cb_f stream);

Cf_lwt.RunLoop.run_thread (fun runloop ->
let rt_f = ref (fun runloop ->
Fsevents.schedule_with_run_loop event_stream runloop run_loop_mode;
if not (Fsevents.start event_stream)
then prerr_endline "Failed to start FSEvents stream"
); >>= fun _ -> Lwt.return ();
)
in

Cf_lwt.RunLoop.run_thread !rt_f; >>= fun _ -> Lwt.return ();

0 comments on commit 77510e3

Please sign in to comment.