Understanding the bounded queue design pattern