Return the system thread group (sometimes also referred as "root thread group").

@return the system thread group
@throws  SecurityException  if the current thread cannot modify
thread groups from this thread's thread group up to the system thread group
765517
public static ThreadGroup getSystemThreadGroup() {
        ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
        while(threadGroup.getParent() != null) {
            threadGroup = threadGroup.getParent();
        }
        return threadGroup;
    }
498794
public List<Group> getTopGroups() {
        if (root != null && root.getGroups() != null && root.getGroups().size() == 1) {
            return root.getGroups().get(0).getGroups();
        }
        return new ArrayList<Group>();
    }
46527
def get_securitygroup(vm_):
    '''
    
    '''
    sgs = list_securitygroup()
    securitygroup = config.get_cloud_config_value(
        'securitygroup', vm_, __opts__, search_global=False
    )

    if not securitygroup:
        raise SaltCloudNotFound('No securitygroup ID specified for this VM.')

    if securitygroup and six.text_type(securitygroup) in sgs:
        return sgs[securitygroup]['SecurityGroupId']
    raise SaltCloudNotFound(
        'The specified security group, \'{0}\', could not be found.'.format(
            securitygroup)
    )
656723
public java.util.List<String> getCustomSecurityGroupIds() {
        if (customSecurityGroupIds == null) {
            customSecurityGroupIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return customSecurityGroupIds;
    }
1228636
public static systemgroup[] get(nitro_service service, String groupname[]) throws Exception{
		if (groupname !=null && groupname.length>0) {
			systemgroup response[] = new systemgroup[groupname.length];
			systemgroup obj[] = new systemgroup[groupname.length];
			for (int i=0;i<groupname.length;i++) {
				obj[i] = new systemgroup();
				obj[i].set_groupname(groupname[i]);
				response[i] = (systemgroup) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}
583900
def get_securitygroup(self, group_id, **kwargs):
        
        if 'mask' not in kwargs:
            kwargs['mask'] = (
                'id,'
                'name,'
                'description,'
                '''rules[id, remoteIp, remoteGroupId,
                         direction, ethertype, portRangeMin,
                         portRangeMax, protocol, createDate, modifyDate],'''
                '''networkComponentBindings[
                    networkComponent[
                        id,
                        port,
                        guest[
                            id,
                            hostname,
                            primaryBackendIpAddress,
                            primaryIpAddress
                        ]
                    ]
                ]'''
            )

        return self.security_group.getObject(id=group_id, **kwargs)
148176
public static AccessContext getAccessContextOnThread() {
        final Stack<AccessContext> stack = threadLocal.get();
        return stack != null ? stack.peek() : null;
    }
283476
public function getGroup()
    {
        if (-1 === $this->index || !$this->valid()) {
            return null;
        }

        return $this->processors[$this->index][1]['group'] ?? null;
    }
407896
public List<SecurityPermission<Resourceadapter<T>>> getAllSecurityPermission()
   {
      List<SecurityPermission<Resourceadapter<T>>> list = new ArrayList<SecurityPermission<Resourceadapter<T>>>();
      List<Node> nodeList = childNode.get("security-permission");
      for(Node node: nodeList)
      {
         SecurityPermission<Resourceadapter<T>>  type = new SecurityPermissionImpl<Resourceadapter<T>>(this, "security-permission", childNode, node);
         list.add(type);
      }
      return list;
   }
1339487
public ThreadGroup getSchedulerThreadGroup ()
  {
    if (m_aThreadGroup == null)
    {
      m_aThreadGroup = new ThreadGroup ("MiniQuartzScheduler:" + getSchedulerName ());
      if (m_aResources.getMakeSchedulerThreadDaemon ())
      {
        m_aThreadGroup.setDaemon (true);
      }
    }

    return m_aThreadGroup;
  }
695544
public java.util.List<String> getRemoveSecurityGroupIds() {
        if (removeSecurityGroupIds == null) {
            removeSecurityGroupIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return removeSecurityGroupIds;
    }
458917
private ThreadGroup getRootThreadGroup() {
	
	    if ( rootThreadGroup != null )
	        return rootThreadGroup;
	    
	    ThreadGroup tg = Thread.currentThread( ).getThreadGroup( );
	    ThreadGroup ptg;
	    while ( (ptg = tg.getParent( )) != null )
	        tg = ptg;
	    
	    return tg;
		
	}
493170
def worker_thread_ids
      thread_group = java.lang.Thread.currentThread.getThreadGroup
      threads = java.lang.reflect.Array.newInstance(
        java.lang.Thread.java_class, thread_group.activeCount)
      thread_group.enumerate(threads)
      # NOTE: we shall check the name from $servlet_context.getServletContextName
      # but that's an implementation detail of the factory currently that threads
      # are named including their context name. thread grouping should be fine !
      threads.map do |thread| # a convention is to name threads as "worker" :
        thread && thread.getName.index(WORKER_THREAD_ID) ? thread.getName : nil
      end.compact
    end
931431
public java.util.List<EC2SecurityGroup> getEC2SecurityGroups() {
        if (eC2SecurityGroups == null) {
            eC2SecurityGroups = new com.amazonaws.internal.SdkInternalList<EC2SecurityGroup>();
        }
        return eC2SecurityGroups;
    }
1341088
public int threads() {
        return Integer.parseInt(
            this.map.getOrDefault(
                "threads",
                String.valueOf(Runtime.getRuntime().availableProcessors() << 2)
            )
        );
    }
911814
public String getParamThread() {

        if ((m_paramThread != null) && (!m_paramThread.equals(CmsUUID.getNullUUID()))) {
            return m_paramThread.toString();
        } else {
            return null;
        }
    }
310342
public java.util.List<VpcSecurityGroupMembership> getVpcSecurityGroups() {
        if (vpcSecurityGroups == null) {
            vpcSecurityGroups = new com.amazonaws.internal.SdkInternalList<VpcSecurityGroupMembership>();
        }
        return vpcSecurityGroups;
    }