Hacker News new | ask | show | jobs
by thinkcritical 404 days ago
No, a stack is LIFO like it said. A queue is FIFO or in other words LILO “Last In Last Out”.
1 comments

My last job was at the office. I had my work queue implemented as a stack of files. I would sit at my desk and, in an infinite loop, pop files from my stack and process them. Occasionally, my supervisor would come and push a new file onto my stack. A naive worker would think that, once I was done with my stack, I could finally get some sleep, but no. Our office implemented something called "work stealing," where, once I was done with my own work, I had to visit a random co-worker and pop files from their stack.