Take with Timeout


Originally published at: https://purelyfunctional.tv/core-async-patterns/take-with-timeout/
What if you want to take from a channel, but give up after a time? This is very useful when testing that something was put onto a channel. You can’t wait forever, because then your tests will never finish. core.async makes this quite easy.