From 6857a6552f5d03de589400fe60b324c114457d2e Mon Sep 17 00:00:00 2001 From: Deepali Date: Sat, 21 Oct 2023 17:52:33 +0530 Subject: [PATCH] Remove Yield effect from the repo --- aio/aio.ml | 9 +-------- aio/aio.mli | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/aio/aio.ml b/aio/aio.ml index 94740c3..13db1de 100644 --- a/aio/aio.ml +++ b/aio/aio.ml @@ -12,7 +12,6 @@ type file_descr = Unix.file_descr type sockaddr = Unix.sockaddr type msg_flag = Unix.msg_flag type _ Effect.t += Fork : (unit -> unit) -> unit Effect.t -type _ Effect.t += Yield : unit Effect.t type _ Effect.t += Accept : file_descr -> (file_descr * sockaddr) Effect.t type _ Effect.t += @@ -24,7 +23,6 @@ type _ Effect.t += type _ Effect.t += Sleep : float -> unit Effect.t let fork f = perform (Fork f) -let yield () = perform Yield let accept fd = perform (Accept fd) let recv fd buf pos len mode = perform (Recv (fd, buf, pos, len, mode)) let send fd bus pos len mode = perform (Send (fd, bus, pos, len, mode)) @@ -163,14 +161,9 @@ let run main = effc = (fun (type a) (e : a Effect.t) -> match e with - | Yield -> - Some - (fun (k : (a, _) continuation) -> - enqueue_thread st k (); - schedule st) | Fork f -> Some - (fun k -> + (fun (k : (a, _) continuation) -> enqueue_thread st k (); fork st f) | Accept fd -> diff --git a/aio/aio.mli b/aio/aio.mli index ca972a1..349a7f8 100644 --- a/aio/aio.mli +++ b/aio/aio.mli @@ -7,7 +7,6 @@ *) val fork : (unit -> unit) -> unit -val yield : unit -> unit type file_descr = Unix.file_descr type sockaddr = Unix.sockaddr