Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@ -220,6 +220,7 @@ namespace MonoTests.System.Runtime.Remoting
public void TestLocked1 ()
{
sincob.Lock (false);
Thread tr = new Thread (new ThreadStart (FirstSyncThread));
tr.Start ();
Thread.Sleep (200);
@ -331,6 +332,21 @@ namespace MonoTests.System.Runtime.Remoting
Assert.IsTrue (!otResult, "Concurrency detected in CallbackThread");
}
[Test]
public void TestSynchronizationReleasedOnMultipleAcquire ()
{
otResult = notreentrant.TestCallback ();
Thread tr = new Thread (new ThreadStart (CallbackThread));
tr.Start();
bool terminated = tr.Join(2000);
Assert.IsTrue(terminated, "Thread didn't get lock of context bound object.");
Assert.IsTrue (!otResult, "Concurrency detected in CallbackThread");
}
void CallbackThread ()
{
otResult = notreentrant.TestCallback ();