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.
Parts of courses on specific topics
This lesson introduces you to Jennifer and Mark. Jennifer owns a toy factory and Mark builds toy cars. You’ll begin to decompose a sequential process into the steps that will execute concurrently.
When work tasks are being produced, we often want to handle them in a thread pool. This is exceedingly easy in core.async. Channels are queues, and we can use the `core.async/thread` macro to create threads easily. If each loops through the tasks it gets from the queue, the work can be done in parallel.
Rate limiting is kind of hard to implement, especially across multiple threads. But in core.async, it’s not hard at all. In this lesson, we implement a simple rate limiting algorithm called a *token bucket*.