CSPspEmu.Hle.Managers.HleThreadManager.GetThreadById C# (CSharp) Method

GetThreadById() public method

public GetThreadById ( int Id, bool AllowSelf = true ) : HleThread
Id int
AllowSelf bool
return HleThread
        public HleThread GetThreadById(int Id, bool AllowSelf = true)
        {
            //Debug.WriteLine(Threads.Count);
            if (Id == 0)
            {
                if (!AllowSelf) throw (new SceKernelException(SceKernelErrors.ERROR_KERNEL_ILLEGAL_THREAD));
                return Current;
            }
            HleThread HleThread = null;
            ThreadsById.TryGetValue(Id, out HleThread);
            if (HleThread == null) throw(new SceKernelException(SceKernelErrors.ERROR_KERNEL_NOT_FOUND_THREAD));
            return HleThread;
        }