Jesse Storimer's Blog Archives tagged Multi-threading

Nobody understands the GIL - Part 3: Thread Safety - June 21, 2013

There are some misconceptions in the Ruby community about this question surrounding MRI's GIL. If you only take one thing away from this article today, let it be this: The GIL does not make your Ruby code thread-safe. But you shouldn't take my word for it. This series started off just trying to understand what the GIL is at a technical ...
Read more

Nobody understands the GIL - Part 2: Implementation - June 14, 2013

Last time, I began wanting to take you on a deep dive into MRI to see how the GIL is implemented. But first, I wanted to make sure I was asking the right question. Part 1 formulated the question, but today we'll look for answers inside MRI itself. We'll go looking for that elusive creature they call the GIL In the ...
Read more

Nobody understands the GIL - June 12, 2013

Throughout most of my time in the Ruby community, MRI's infamous GIL has been an elusive creature for me. This is a story about thread safety, and finally catching that elusive creature to get a good look at it. The first time I heard mention of the GIL, it had nothing to do with how it worked, what it did, ...
Read more

How many threads is too many? - May 26, 2013

This is a sample chapter from my ebook Working With Ruby Threads. If you're curious about all the talk in the community about multi-threaded concurrency, this book will give you a gentle introduction so you can join the conversation. This question is relevant whether you're whipping up a quick script to scrape some websites, trying to speed up a long-running ...
Read more

Threads, Not Just for Optimizations - January 24, 2013

The Ruby community seems to be abuzz with people talking about threads. But often, the conversation is geared towards the fact that our machines all have multiple cores, and we (c|sh)ould be running our code in parallel, blazing fast on ALL the cores. I absolutely think this is a good idea, but I want to talk about the other side ...
Read more

Matz is not a threading guy - November 08, 2012

I attended my very first Rubyconf last week. There were certainly some common themes that I kept hearing over and over again throughout the course of the conference. Among other things, there was JRuby, threading, the GVL, and MRI 2.0. We got to see a few talks about the new features in MRI 2.0. One of the oft-discussed features was ...
Read more