Microsoft.Ccr.Core.CcrWorker.Start C# (CSharp) Méthode

Start() private méthode

private Start ( ) : void
Résultat void
        internal void Start()
        {
            thread = dispatcher.maxThreadStackSize == 0 ? new Thread (this.Run) : new Thread (this.Run, dispatcher.maxThreadStackSize);
            thread.Name = String.Format ("{0} ThreadPoolThread ID: {1}", dispatcher.Name, this.currentQueue);
            thread.Priority = dispatcher.priority;
            thread.IsBackground = (dispatcher.options & DispatcherOptions.UseBackgroundThreads) != 0;
            if (dispatcher.state.HasValue)
                thread.SetApartmentState (dispatcher.state.Value);
            thread.Start ();
        }

Usage Example

Exemple #1
0
 internal void SpawnWorker()
 {
     lock (_lock) {
         if (workers.Count >= maxThreads)
             return;
         var w = new CcrWorker (this, queues.Length);
         workers.Add (w);
         w.Start ();
     }
 }