It seems there is no native support for something like multi-thread-safe work queue, such as blocking queue or concurrent queue in other languages. Work queue is very important to the users in writing some Event Drive code , PUB/SUB mode or something like Job Dispatch procedures.
Requests is very simple: Let users to decide whether BLOCK the consumer or not, and Let users to decide HOW MANY Threads should WAIT for the incoming job, and Let users to decide HOW MANY job dispatchers in the system.
After checking the Channel(SPSC, MPSC, or Broadcast) and some Tokio things look similar to the standard lib, I am so confused how to realize a WORK QUEUE by these Channel things? Manually park or unpark the job consumer thread with future things? Building 2 channels between job dispatcher and the actual worker thread? How can I realize the thread competition?
Is there any solution or stable crate?