Imported Upstream version 5.20.0.185
Former-commit-id: fcd643a64a9c5470917dbbb1be4ba228e5c14650
This commit is contained in:
parent
97f8185566
commit
f737def5f5
@ -1 +1 @@
|
|||||||
b796426724e7961d0e254ca3f7d9ac4049499d5d
|
dedcdea54ed22b2f5d3bb7e1de37b77702527d1a
|
@ -1 +1 @@
|
|||||||
edc8bec4f4b607c3a97b3df060a00581a5ec2e30
|
aef91595c533d430081888c8af71445b4fc3f164
|
@ -1 +1 @@
|
|||||||
5720eb204ffdc35ca77f9c0f4c69efa1779a6fe7
|
a2da0f3967d88642e55a982da38b2df455a79b70
|
@ -1 +1 @@
|
|||||||
3bfb5c5d5207383227a9277b36b995ff585297ba
|
34ad6abcc4b7e3861a2242154197ae0f8dd7b2cc
|
@ -1 +1 @@
|
|||||||
ed19cc64be777080a3bba2cb682288cc5b3e9d20
|
9f78547be1fb0d89abe4b6081fd5e151a17e94c8
|
@ -34,7 +34,7 @@ static class Consts
|
|||||||
// Use these assembly version constants to make code more maintainable.
|
// Use these assembly version constants to make code more maintainable.
|
||||||
//
|
//
|
||||||
|
|
||||||
public const string MonoVersion = "5.20.0.184";
|
public const string MonoVersion = "5.20.0.185";
|
||||||
public const string MonoCompany = "Mono development team";
|
public const string MonoCompany = "Mono development team";
|
||||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||||
public const string MonoCopyright = "(c) Various Mono authors";
|
public const string MonoCopyright = "(c) Various Mono authors";
|
||||||
|
@ -491,6 +491,35 @@ namespace MonoTests.System.Threading
|
|||||||
c1.Dispose ();
|
c1.Dispose ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test] // https://github.com/mono/mono/issues/12421
|
||||||
|
public void EnsurePostIsNotCalled ()
|
||||||
|
{
|
||||||
|
SynchronizationContext mainContext = SynchronizationContext.Current;
|
||||||
|
var asc = new AssertSyncContext ();
|
||||||
|
SynchronizationContext.SetSynchronizationContext (asc);
|
||||||
|
var ct = new CancellationTokenSource ();
|
||||||
|
var tcs = new TaskCompletionSource<bool> ();
|
||||||
|
ct.Token.Register (() => tcs.TrySetCanceled ());
|
||||||
|
|
||||||
|
bool taskIsCancelled = false;
|
||||||
|
Action awaitAction = async () => {
|
||||||
|
try { await tcs.Task; }
|
||||||
|
catch (OperationCanceledException) {
|
||||||
|
taskIsCancelled = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
awaitAction ();
|
||||||
|
ct.Cancel (); // should not trigger SynchronizationContext.Post
|
||||||
|
Assert.IsTrue (taskIsCancelled);
|
||||||
|
SynchronizationContext.SetSynchronizationContext (mainContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
class AssertSyncContext : SynchronizationContext
|
||||||
|
{
|
||||||
|
public override void Post (SendOrPostCallback d, object state) =>
|
||||||
|
throw new InvalidOperationException ("SynchronizationContext.Post was not expected.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
434209ab0071fbc27efd9219f99f4dd3f9f3c5a5
|
ac73c8792dbdb43746aeeab1d2fc010ecce1f93e
|
@ -1 +1 @@
|
|||||||
865e5662e29da2a52bb18b2500ddc7bd5f45d50f
|
d83abc65e85980dfa39ccd8b45dd4523d2330d92
|
@ -1 +1 @@
|
|||||||
6a865dece6532c6139ed10e8bfc0b21b1525bed6
|
e419c4c654ebfad7e118b5b0a5036e6c85d3117c
|
@ -1 +1 @@
|
|||||||
5a096ae0d88faf3f76e9e3a8950467a4a409c735
|
02b5acbd3ff197caf5a6c6eb99377e21adea61c4
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
36de3a387d536149b60018901ae19b8a27886712
|
1cb2c7d258fdc2216c31ee23f656fbaa79b1913d
|
@ -1 +1 @@
|
|||||||
b11e33b00feef3ef153728eefb46a0b6e937b126
|
f3e061ca2f4014e9d695b3e563bab23ecbccfa13
|
@ -1 +1 @@
|
|||||||
8df6f0bf6e9dca89d20ab916dc3c7b449bfbeb4b
|
6ea4aa06adb4bbd8260a701a273a7365c0c9b2b5
|
@ -1 +1 @@
|
|||||||
1caba0de2880f7ce16a6137889542db4278b682d
|
3f48bcd204d1b36acaec348197e0b79b783603b0
|
@ -1 +1 @@
|
|||||||
58981cf12840e74fa15ccaae8ebaacf740707edf
|
1c28a232761b6a636d065c9084b7a6dcf3bba522
|
@ -1 +1 @@
|
|||||||
865e5662e29da2a52bb18b2500ddc7bd5f45d50f
|
d83abc65e85980dfa39ccd8b45dd4523d2330d92
|
@ -1 +1 @@
|
|||||||
6a865dece6532c6139ed10e8bfc0b21b1525bed6
|
e419c4c654ebfad7e118b5b0a5036e6c85d3117c
|
@ -1 +1 @@
|
|||||||
5a096ae0d88faf3f76e9e3a8950467a4a409c735
|
02b5acbd3ff197caf5a6c6eb99377e21adea61c4
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user