[IL2CPP] AsyncWaitHandle.WaitOne() function call raise System.NotSupportedException.

Unity3D : 4.6.3f1

Code :
asyncConnect = socket.BeginConnect(hostEndPoint, new AsyncCallback(ConnectCallBack), null);

//
bool success = asyncConnect.AsyncWaitHandle.WaitOne(new TimeSpan(0, 0, 0, CONNECT_TIMEOUT), true);
if (success == false)
{
socket.Close();
throw new SocketException(10060);
}

Exception :
[02/25 11:30:32] System.NotSupportedException: Tools/il2cpp/il2cpp/libil2cpp/icalls/mscorlib/System/AppDomain.cpp(98) : Unsupported internal call for IL2CPP:AppDomain::InternalGetContext - “This icall is only used in System.Threading.Thread.CurrentContext, which is used in the System.Runtime.Remoting namespace.”
at System.Runtime.Remoting.Contexts.SynchronizationAttribute.EnterContext () [0x00000] in :0
at System.Threading.WaitHandle.WaitOne (TimeSpan timeout, Boolean exitContext) [0x00000] in :0

Unity3D : 4.6.4f1
have the same problem

We don’t support synchronization contexts ATM, so the “true” argument to WaitOne() runs into our internals throwing when that codepath is hit.

If possible, could you shed some light on your particular use case(s) for synchronization contexts here?

Either way, please file a bug and we’ll take a closer look to determine what should happen.