Skip to content

Commit 4c0999e

Browse files
Change name from no_wait to dont_wait
1 parent 61a4d5f commit 4c0999e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

CHANGES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
* Lwt.reraise an exception raising function which preserves backtraces, recommended for use in Lwt.catch (#963)
1010

11-
* Lwt_preemptive.run_in_main_no_wait to run a function in the main preemptive thread but without waiting for the result. (Kate Deplaix, #960)
11+
* Lwt_preemptive.run_in_main_dont_wait to run a function in the main preemptive thread but without waiting for the result. (Kate Deplaix, #960)
1212

1313
====== Build ======
1414

src/unix/lwt_preemptive.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ let job_notification =
228228
Mutex.unlock jobs_mutex;
229229
ignore (thunk ()))
230230

231-
let run_in_main_no_wait f =
231+
let run_in_main_dont_wait f =
232232
(* Add the job to the queue. *)
233233
Mutex.lock jobs_mutex;
234234
Queue.add f jobs;
@@ -253,7 +253,7 @@ let run_in_main f =
253253
CELL.set cell result;
254254
Lwt.return_unit
255255
in
256-
run_in_main_no_wait job;
256+
run_in_main_dont_wait job;
257257
(* Wait for the result. *)
258258
match CELL.get cell with
259259
| Result.Ok ret -> ret

src/unix/lwt_preemptive.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ val run_in_main : (unit -> 'a Lwt.t) -> 'a
3434
retrieve values set this way inside [f ()], but not values set using
3535
{!Lwt.with_value} outside [f ()]. *)
3636

37-
val run_in_main_no_wait : (unit -> unit Lwt.t) -> unit
38-
(** [run_in_main_no_wait f] does the same as [run_in_main f] but a bit faster
37+
val run_in_main_dont_wait : (unit -> unit Lwt.t) -> unit
38+
(** [run_in_main_dont_wait f] does the same as [run_in_main f] but a bit faster
3939
and lighter as it does not wait for the result of [f].
4040
4141
@since 5.7.0 *)

test/unix/test_lwt_unix.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,10 +1063,10 @@ let lwt_preemptive_tests = [
10631063
Lwt_preemptive.detach f () >>= fun x ->
10641064
Lwt.return (x = 42)
10651065
end;
1066-
test "run_in_main_no_wait" begin fun () ->
1066+
test "run_in_main_dont_wait" begin fun () ->
10671067
let p, r = Lwt.wait () in
10681068
let f () =
1069-
Lwt_preemptive.run_in_main_no_wait (fun () ->
1069+
Lwt_preemptive.run_in_main_dont_wait (fun () ->
10701070
Lwt.pause () >>= fun () ->
10711071
Lwt.pause () >>= fun () ->
10721072
Lwt.wakeup r 42;

0 commit comments

Comments
 (0)