In this episode we take some already-good code and make it even better.
Tag: containers
Episode #141: Bounded Queue
We continue to evolve our thread-safe queue implementation. Today, we add the ability to set a bound on the queue size.
Episode #139: Timed Queue
Continuing to build our own thread-safe queue class, today we give it the ability to handle time out enqueues and dequeues.
Episode #128: Enumerable Queue
Queue, somewhat surprisingly, is not enumerable. Which is all the excuse we need to have some more fun with the Enumerator class, in today's episode.
Episode #126: Queue
Today's episode introduces the Queue standard library, and shows how it can be used to coordinate threads.
Episode #080: Splat Basics
Ruby supports a limited form of destructuring assignment, in the form of the "splat" operator. In today's episode we go over splat basics, in order to lay a foundation for …
Episode #079: Concat
There is more than one way to concatenate arrays, but not all ways are created equal. In this episode we'll compare three approaches in terms of both semantics and efficiency.
Episode #074: Tail Part 3: #rindex
We've figured out how to read chunks of text backwards from a file, now it's time to tackle searching that text for the beginnings of lines.
Episode #064: Yield or Enumerate
A number of Ruby standard library methods return an Enumerator if no block is passed to them. In this episode, we'll learn how to emulate this behavior in our own …