You've already forked linux-packaging-mono
Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
parent
1190d13a04
commit
6bdd276d05
@ -13,6 +13,7 @@ using System;
|
||||
using System.Globalization;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using SD = System.Diagnostics;
|
||||
@ -908,6 +909,23 @@ namespace MonoTests.System.Threading
|
||||
}
|
||||
#endif // MONO_FEATURE_MULTIPLE_APPDOMAINS
|
||||
|
||||
[Test]
|
||||
public void SetNameInThreadPoolThread ()
|
||||
{
|
||||
Task t = Task.Run (delegate () {
|
||||
Thread.CurrentThread.Name = "ThreadName1";
|
||||
Assert.AreEqual (Thread.CurrentThread.Name, "ThreadName1", "#1");
|
||||
|
||||
try {
|
||||
Thread.CurrentThread.Name = "ThreadName2";
|
||||
Assert.Fail ("#2");
|
||||
} catch (InvalidOperationException) {
|
||||
}
|
||||
});
|
||||
|
||||
t.Wait ();
|
||||
}
|
||||
|
||||
void CheckIsRunning (string s, Thread t)
|
||||
{
|
||||
int c = counter;
|
||||
|
Reference in New Issue
Block a user