You've already forked linux-packaging-mono
Imported Upstream version 4.2.1.91
Former-commit-id: b6ad0994c58eaf044e2599fe2ff7996e073c87d2
This commit is contained in:
committed by
Jo Shields
parent
bdd40f83c0
commit
bac3554225
@@ -152,10 +152,7 @@ namespace System
|
||||
stdin = new CStreamReader (OpenStandardInput (0), inputEncoding);
|
||||
} else {
|
||||
#endif
|
||||
// FULL_AOT_RUNTIME is used (instead of MONOTOUCH) since we only want this code when running on
|
||||
// iOS (simulator or devices) and *not* when running tools (e.g. btouch #12179) that needs to use
|
||||
// the mscorlib.dll shipped with Xamarin.iOS
|
||||
#if MONOTOUCH && FULL_AOT_RUNTIME
|
||||
#if MONOTOUCH
|
||||
stdout = new NSLogWriter ();
|
||||
#else
|
||||
stdout = new UnexceptionalStreamWriter (OpenStandardOutput (0), outputEncoding);
|
||||
@@ -163,7 +160,7 @@ namespace System
|
||||
#endif
|
||||
stdout = TextWriter.Synchronized (stdout);
|
||||
|
||||
#if MONOTOUCH && FULL_AOT_RUNTIME
|
||||
#if MONOTOUCH
|
||||
stderr = new NSLogWriter ();
|
||||
#else
|
||||
stderr = new UnexceptionalStreamWriter (OpenStandardError (0), outputEncoding);
|
||||
|
@@ -7,7 +7,7 @@
|
||||
// Copyright 2012-2014 Xamarin Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#if FULL_AOT_RUNTIME
|
||||
#if MONOTOUCH
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
@@ -549,8 +549,7 @@ namespace System {
|
||||
return GetFolderPath (folder, SpecialFolderOption.None);
|
||||
}
|
||||
|
||||
// for monotouch, not monotouch_runtime
|
||||
#if !(MONOTOUCH && FULL_AOT_RUNTIME)
|
||||
#if !MONOTOUCH
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
private extern static string GetWindowsFolderPath (int folder);
|
||||
|
||||
|
@@ -33,7 +33,6 @@ using System;
|
||||
using System.Threading;
|
||||
using NUnit.Framework;
|
||||
using System.Threading.Tasks;
|
||||
using MonoTests.System.Threading.Tasks;
|
||||
|
||||
namespace MonoTests.System.Threading
|
||||
{
|
||||
@@ -447,10 +446,11 @@ namespace MonoTests.System.Threading
|
||||
Assert.IsTrue (canceled, "#3");
|
||||
}
|
||||
|
||||
[Category ("NotWorking")] // why would linked token be imune to ObjectDisposedException on Cancel?
|
||||
[Test]
|
||||
public void ConcurrentCancelLinkedTokenSourceWhileDisposing ()
|
||||
{
|
||||
ParallelTestHelper.Repeat (delegate {
|
||||
for (int i = 0, total = 500; i < total; ++i) {
|
||||
var src = new CancellationTokenSource ();
|
||||
var linked = CancellationTokenSource.CreateLinkedTokenSource (src.Token);
|
||||
var cntd = new CountdownEvent (2);
|
||||
@@ -470,20 +470,19 @@ namespace MonoTests.System.Threading
|
||||
t2.Start ();
|
||||
t1.Join (500);
|
||||
t2.Join (500);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
#if NET_4_5
|
||||
[Test]
|
||||
public void DisposeRace ()
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
for (int i = 0, total = 1000; i < total; ++i) {
|
||||
var c1 = new CancellationTokenSource ();
|
||||
using (c1) {
|
||||
var wh = c1.Token.WaitHandle;
|
||||
c1.CancelAfter (1);
|
||||
Thread.Sleep (1);
|
||||
}
|
||||
var wh = c1.Token.WaitHandle;
|
||||
c1.CancelAfter (1);
|
||||
Thread.Sleep (1);
|
||||
c1.Dispose ();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user