Indicates whether thread-local has been initialised for the current thread.
5476
public boolean isInitialized() {
        WeakReference<Holder> ref = local.get();
        if (ref != null) {
            Holder holder = ref.get();
            return holder != null && holder.value != UNINITIALISED;
        } else {
            return false;
        }
    }
1193669
def _threaded_start(self):
        '''
        
        '''
        self.active = True
        self.thread = Thread(target=self._main_loop)
        self.thread.setDaemon(True)
        self.thread.start()
1047443
public static void assertMainThread() {
		if (imp != null && !DispatchQueue.isMainQueue()) {
			imp.assertFailed(StringUtils.format("Expected 'main' thread but was '%s'", Thread.currentThread().getName()));
		}
	}
384805
public static boolean isInitialized() {
    final boolean loaded =
        JQueryResources.rememberEvent != null || StringUtils.isEmpty(JQueryResources.JQUERY_URL);
    return loaded || JQueryResources.isInHeader();
  }
1295960
private void ensureWatchThreadRunning() {
		if (!threadRunning) {
			thread = new Thread(watchThread);
			thread.setDaemon(true);
			thread.start();
			watchThread.setThread(thread);
			watchThread.updateName();
			threadRunning = true;
		}
	}
1324366
private boolean okayToSendServerStarted() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "okayToSendServerStarted", this);

        synchronized (lockObject) {
            if (!_sentServerStarted) {
                if ((_state == STATE_STARTED) && _mainImpl.isServerStarted()) {
                    _sentServerStarted = true;
                }
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "okayToSendServerStarted", new Boolean(_sentServerStarted));
        return _sentServerStarted;
    }
1195601
private void init() {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        Map<String, Map<String, Object>> threadContextConfigs = new HashMap<String, Map<String, Object>>();

        for (Enumeration<String> keys = properties.keys(); keys.hasMoreElements();) {
            String key = keys.nextElement();
            // Properties of flattened thread context configurations have the form:
            // threadContextConfigRef.0.*
            if (key.length() > 25 && key.charAt(22) == '.') {
                int dot = key.indexOf('.', 23);
                if (dot > 0) {
                    String group = key.substring(23, dot);
                    Map<String, Object> config = threadContextConfigs.get(group);
                    if (config == null)
                        threadContextConfigs.put(group, config = new TreeMap<String, Object>());
                    config.put(key.substring(dot + 1), properties.get(key));
                }
            } else if (trace && tc.isDebugEnabled() && !SUPPORTED_PROPERTIES.contains(key) && key.indexOf('.') < 0) {
                Tr.debug(this, tc, "unrecognized attribute: " + key);
                // TODO: once we have stricter variant of onError, do the following for it:
                //IllegalArgumentException x = ignoreWarnOrFail(null, IllegalArgumentException.class, "CWWKC1000.unrecognized.property", name, key);
                //if (x != null)
                //    throw x;
            }
        }

        threadContextConfigurations = new TreeMap<String, Map<String, ?>>();
        for (Map<String, Object> threadContextConfig : threadContextConfigs.values()) {
            String provider = (String) threadContextConfig.get("threadContextProvider");
            if (provider == null)
                provider = (String) threadContextConfig.get("config.referenceType") + ".provider";
            Map<String, ?> previous = threadContextConfigurations.put(provider, threadContextConfig);
            if (previous != null)
                throw new IllegalArgumentException(Tr.formatMessage(tc, "CWWKC1002.provider.cardinality.violation", name, previous.get("config.referenceType")));
        }

        // Inherit complementary thread context config from base instance
        ContextServiceImpl baseInstance = AccessController.doPrivileged(new PrivilegedAction<ContextServiceImpl>() {
            @Override
            public ContextServiceImpl run() {
                return (ContextServiceImpl) componentContext.locateService(BASE_INSTANCE);
            }
        });
        if (baseInstance != null)
            baseInstance.addComplementaryThreadContextConfigurationsTo(this);

        if (trace && tc.isDebugEnabled())
            Tr.debug(this, tc, "context configuration", threadContextConfigurations);
    }
1289329
def on_threadpool?
      tp = nil

      @mutex.synchronize do
        return false unless @threadpool # you can't dup nil
        tp = @threadpool.dup
      end

      tp.respond_to?(:include?) and tp.include?(Thread.current)
    end
949225
def is_all_initialized(self):
        '''
        '''
        return frozenset(self._class_map.keys()) == \
            frozenset(self._instance_map.keys())
1070838
public static BegunTx<?> getBegunTxOnThread() {
        final Stack<BegunTx<?>> stack = threadLocal.get();
        return stack != null ? stack.peek() : null;
    }
1078101
public boolean compileIsModified()
  {
    if (_compileIsModified)
      return true;

    CompileThread compileThread = new CompileThread();
    ThreadPool.current().start(compileThread);

    try {
      synchronized (compileThread) {
        if (! compileThread.isDone())
          compileThread.wait(5000);
      }

      if (_compileIsModified)
        return true;
      else if (compileThread.isDone()) {
        //setDependPath(getClassPath());

        return reloadIsModified();
      }
      else
        return true;
    } catch (Throwable e) {
    }

    return false;
  }
833057
def instance_thread_global(name, value = nil)
      sc = class << self
        extend DSLKit::ThreadGlobal
        self
      end
      sc.thread_global name, value
      self
    end
594055
protected boolean isMain(Thread thread) {
		return thread.getName().equals("main") && thread.getContextClassLoader()
				.getClass().getName().contains("AppClassLoader");
	}
395528
private static ThreadState state()
    {
        ThreadState state=(ThreadState)__states.get();
        if (state==null)
        {
            state=new ThreadState();
            __states.set(state);
        }
        return state;
    }
755984
private boolean isOutOrBelow(Context current)
	{
		Context c = current.threadState.outctxt;

		while (c != null)
		{
			if (c == current)
			{
				return true;
			}
			c = c.outer;
		}

		return false;
	}
399180
private ThreadLocal<StringMap> createThreadLocalMap() {
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        final boolean inheritable = managerProps.getBooleanProperty(INHERITABLE_MAP);
        if (inheritable) {
            return new InheritableThreadLocal<StringMap>() {
                @Override
                protected StringMap childValue(final StringMap parentValue) {
                    return parentValue != null ? createStringMap(parentValue) : null;
                }
            };
        }
        // if not inheritable, return plain ThreadLocal with null as initial value
        return new ThreadLocal<>();
    }
118297
def set_thread_local_value(name, value) #:nodoc:
      values = Thread.current[name]
      unless values
        values = {}
        Thread.current[name] = values
      end
      if value.nil?
        values.delete(self)
        Thread.current[name] = nil if values.empty?
      else
        values[self] = value
      end
    end