3 ms·
Another thing to consider is thread safety. "require" is not thread safe, so if your app is multi-threaded, it's actually a good idea to load everything up fron
by Perceptes 14y ago
Another thing to consider is thread safety. "require" is not thread safe, so if your app is multi-threaded, it's actually a good idea to load everything up front. Granted, you can still do this with manual requires, but Bundler.require does that job for you pretty nicely.
- anti-pattern 14y agoAh, that isn't something I considered. I don't write my apps multi-threaded, so it shouldn't be an issue, but definitely good to be aware of.