Using a dict here is fine. Just don't call it a queue. :-)