Merge pull request #297 from ermshiperete/4959
[mono.git] / mcs / class / corlib / System.Threading.Tasks / ParallelOptions.cs
index 6c3c5a0a394e1622b87fa804552e0ffaf686489b..ac9635cd080efaf7d8884b451183d5130fe05c04 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 // 
 // ParallelOptions.cs
 //  
@@ -25,6 +24,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if NET_4_0 || MOBILE
 using System;
 using System.Threading;
 
@@ -33,14 +33,12 @@ namespace System.Threading.Tasks
        
        public class ParallelOptions
        {
-               static CancellationTokenSource src = new CancellationTokenSource ();
-               
                internal static readonly ParallelOptions Default = new ParallelOptions ();
                
                public ParallelOptions()
                {
                        this.MaxDegreeOfParallelism = -1;
-                       this.CancellationToken = src.Token;
+                       this.CancellationToken = CancellationToken.None;
                        this.TaskScheduler = TaskScheduler.Current;
                }