* are initialized, and any libraries required on the command line are
* loaded.
*/
private void init() {
// Get the main threadcontext (gets constructed for us)
ThreadContext tc = getCurrentContext();
safeLevel = config.getSafeLevel();
// Construct key services
loadService = config.createLoadService(this);
posix = POSIXFactory.getPOSIX(new JRubyPOSIXHandler(this), RubyInstanceConfig.nativeEnabled);
javaSupport = new JavaSupport(this);
if (RubyInstanceConfig.POOLING_ENABLED) {
Executors.newCachedThreadPool();
executor = new ThreadPoolExecutor(
RubyInstanceConfig.POOL_MIN,
RubyInstanceConfig.POOL_MAX,
RubyInstanceConfig.POOL_TTL,
TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(),
new DaemonThreadFactory());
}
// initialize the root of the class hierarchy completely
initRoot();
// Construct the top-level execution frame and scope for the main thread
tc.prepareTopLevel(objectClass, topSelf);
// Initialize all the core classes
bootstrap();
// Initialize the "dummy" class used as a marker