Queues: computers vs life

Most computer programmers will be familiar with the concept of the queue. It’s a first in, first out structure; in other words, the first thing you add to the queue will be the first thing that comes out of it. Your email works like this, for instance. The oldest message received by your ISP will be the first one that gets downloaded to your PC (unless you’re the kind of person that uses manual POP3 commands to read their email).
I have observed, however, that this is simply a subset of queues. I base this statement on my experiences in the superset.
The LondonBusQueue class would let items join at any point, move about in the queue while waiting to be processed, and then leave the queue in any order. Older items tend to obey the more strict Queue rules, but younger items rarely join the queue at the end; they also exhibit much more random behaviour within the queue. Items with children often barge items higher up in the queue, using a call to Pushchair() to force them out of the way.
Having studied the LondonBusQueue class in detail, I have to say I much prefer the standard Queue.
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s