• Skip to main content
  • Skip to footer

PurelyFunctional.tv

  • Learn Clojure
  • About
  • 🛒 Cart
  • Log in
Kill switch

Want this course?

$200.00 – Team License Checkout Added to cart
$24.00 – Download License Checkout Added to cart
$18.00 – Online License Checkout Added to cart
Membership
Download
 Video time: 03m09s
PREVIOUS
NEXT

Want this course?

$200.00 – Team License Checkout Added to cart
$24.00 – Download License Checkout Added to cart
$18.00 – Online License Checkout Added to cart
Membership

Kill switch

Course: core.async Patterns

Updated October 25, 2019

Description
Code

On the JVM, there is no way to stop a thread from the outside. The same is true of core.async go processes. The only way to stop it is from the inside. A common way to kill multiple threads/go processes is to make a channel signal that they should die.

Buy this course to view the code.

Next Lesson

4 min

Poison pill

If you need finer control over which workers die, you could implement the poison pill pattern. In this one, a special value is considered to be a signal to die.

Course: core.async Patterns

0 / 10
0 / 10
 
Lessons
 
Take with Timeout
 
6 min 
 
Put with Timeout
 
1 min 
 
go-throw
 
7 min 
 
Thread pool
 
5 min 
 
Backpressure
 
8 min 
 
Kill switch
 
3 min 
 
Poison pill
 
4 min 
 
Start latch
 
2 min 
 
Token bucket
 
6 min 
 
Refining values over time
 
8 min 

Footer CTA

Get the newsletter for free

The PurelyFunctional.tv Newsletter is a weekly email to inspire functional programmers.

Enter your email address to receive emails about Clojure and Functional Programming. These include the weekly newsletter and other great offers. You can unsubscribe any time.

Copyright © 2021 LispCast and Eric Normand