Added second template parameter to counted multiqueue