How can I run a set of functions on a recurring interval without running the same function at the same time using only the standard Rust library?
问题 I would like to use Rust to create a simple scheduler in order to run multiple concurrent functions at a defined time but do not start more if they haven't finished. For example, if the defined interval is one second, the scheduler should run the functions and don't start more if the previous functions have not returned. The goal is to prevent running the same function multiple times. I created a working example with Go like this: package main import ( "fmt" "sync" "time" ) func myFunc(wg