I've seen this way of implementing a queue with two stacks: https://stackoverflow.com/a/2050402/494094
And I've read that this way the queue is immutable and thread-safe. What's the point that separates this from a normal queue and makes it immutable and thread-safe?
I'd really appreciate it if someone could explain it in a simple, non-professional way.