return res.Result;
}
+#if !MOBILE_STATIC
[Test]
public void FinishedTaskOnCompleted ()
{
Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");;
}
+#endif
+
[Test]
public void CompletionOnSameCustomSynchronizationContext ()
{
public void NestedLeakingSynchronizationContext ()
{
var sc = SynchronizationContext.Current;
- Assert.IsTrue (NestedLeakingSynchronizationContext_MainAsync (sc).Wait (5000), "#1");
+ if (sc == null)
+ Assert.IsTrue (NestedLeakingSynchronizationContext_MainAsync (sc).Wait (5000), "#1");
+ else
+ Assert.Ignore ("NestedSynchronizationContext may never complete on custom context");
}
static async Task NestedLeakingSynchronizationContext_MainAsync (SynchronizationContext sc)