class for closable queues