I have this piece of code and I want a good method to stop the consumer threads:
import java.util.ArrayDeque; import java.util.Queue; import java.util.concurr