From d4c4d9e7d63b40118b3d070ec672ed73f1452a2d Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 19 Oct 2023 22:24:14 -0700 Subject: [PATCH] Input::Query --- src/worker.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/worker.rs b/src/worker.rs index 1383981..5c97763 100644 --- a/src/worker.rs +++ b/src/worker.rs @@ -16,7 +16,11 @@ enum Input{ //Immediate input to any available worker, dropped if they are overflowing (all workers are busy) Immediate, //Queued input is ordered, but serial jobs that mutate state (such as running physics) can only be done with a single worker - Queued, + Queued,//"Fifo" + //Query a function to get next input when a thread becomes available + //worker stops querying when Query function returns None and dies after all threads complete + //lifetimes sound crazy on this one + Query, } //WorkerOutput enum Output{