My favorite thing about channels is how they're a universal synchronization primitive. A channel is not just a channel, but also: - a mutex - a semaphore - a wait group - a parker - and a lot more... 1/5
-
-
Parker: https://doc.rust-lang.org/std/thread/fn.park.html … Make a channel of capacity 1 that is initially empty. To park the current thread, call recv(). To unpark a thread, call try_send(()). 5/5
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.