A bucket based queue implementation