When MRI 1.9 is triggered, it generates two native threads. One thread for the virtual machine, the other for signal processing. Rubinis uses this strategy, as does the JVM. Pipes can be used to transfer any information from other processes.
As for the FileUtils module, cd , pwd , mkdir , rm , ln , cp , mv , chmod , chown and touch all, to one degree or another, transferred to third-party OS utilities using the internal API of the StreamUtils submodule, while the second stream remains to wait signal from an external process. Since these methods are thread safe enough, there is no need to block the interpreter, and therefore the methods do not block each other.
Edit:
MRI 1.8.7 is pretty smart and knows that when Thread expects some external event (for example, a browser to send an HTTP request), Thread can be launched and woken up when data is detected - Evan Phoenix from Engine Yard in Ruby, Concurrency and you
The implementation of the base implementation for FileUtils did not change the meaning of 1.8.7 from viewing the source. 1.8.7 also uses the sleep timer thread to wait for an IO response. The main difference in 1.9 is the use of native threads, not green threads. Also significantly improved source code stream.
By thread safety, I mean that, since there is nothing in common between the processes, there is no reason to block the global interpreter. There is a misconception that Ruby "blocks" when performing certain tasks. Whenever the thread should block, i.e. Waiting without using any processor, Ruby just schedules another thread. However, in certain situations, for example, in a server rack that uses 20% of the processor, waiting for a response, it may be advisable to unlock the interpreter and allow parallel threads to process other requests while waiting. These threads, in a sense, work in parallel. GIL unlocked rb_thread_blocking_region API. Here is a good post in this thread .