Unity-Technologies/mono — pull request #169 by richard-fine (2014-11-12 21:47:40+00:00)
Title: Managed thread id fix (case 601660)

Fixes managed thread ID allocation resetting on domain reload, and allocating the same ID to both the main thread and the next thread to request an ID, by moving the next-thread-ID counter and increment to native code.

Also add an audit entry for System.Threading.Thread.GetNewManagedID to indicate that it's SecuritySafeCritical, so that untrusted code can get to the icall OK.