Inheritance: IDisposable
Beispiel #1
0
        public static NamedThread Run(string name, Action <CancellationToken> action)
        {
            lock (Threads)
            {
                NamedThread namedThread = Threads[name];
                if (namedThread == null)
                {
                    namedThread = new NamedThread(name, action);
                }

                return(namedThread);
            }
        }
Beispiel #2
0
        public static void Abort(string name, int millisecondsTimeout = 1000)
        {
            lock (Threads)
            {
                NamedThread namedThread = Threads[name];
                if (namedThread == null)
                {
                    return;
                }

                namedThread.Abort(millisecondsTimeout);
            }
        }
Beispiel #3
0
        public static NamedThread Run(string name, Action<CancellationToken> action)
        {
            lock (Threads)
            {
                NamedThread namedThread = Threads[name];
                if (namedThread == null)
                    namedThread = new NamedThread(name, action);

                return namedThread;
            }
        }