Debian Codegraph @

external/rx/Rx/NET/Source/System.Reactive.PlatformServices/Reactive/Concurrency/Thread.Stub.cs

raw
1 // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
3 #if NO_THREAD
4 using System;
5 using System.Threading;
6
7 namespace System.Reactive.Concurrency
8 {
9 class Thread
10 {
11 private readonly ThreadStart _start;
12
13 public Thread(ThreadStart start)
14 {
15 _start = start;
16 }
17
18 public string Name { get; set; }
19 public bool IsBackground { get; set; }
20
21 public void Start()
22 {
23 System.Threading.Tasks.Task.Factory.StartNew(Run, System.Threading.Tasks.TaskCreationOptions.LongRunning);
24 }
25
26 private void Run()
27 {
28 _start();
29 }
30 }
31
32 delegate void ThreadStart();
33 }
34 #endif