Windows.System.Threading.Core.PreallocatedWorkItem.RunAsync C# (CSharp) Method

RunAsync() public method

public RunAsync ( ) : IAsyncAction
return IAsyncAction
		public extern IAsyncAction RunAsync();
	}

Usage Example

Example #1
0
        public NetThread(string name, int sleepTime, Action callback)
        {
            _callback = callback;
            SleepTime = sleepTime;
            _running = true;
#if USE_WINRT
            var thread = new PreallocatedWorkItem(ThreadLogic, WorkItemPriority.Normal, WorkItemOptions.TimeSliced);
            thread.RunAsync().AsTask();
#else
            _thread = new Thread(ThreadLogic)
            {
                Name = name,
                IsBackground = true
            };
            _thread.Start();
#endif
        }
All Usage Examples Of Windows.System.Threading.Core.PreallocatedWorkItem::RunAsync