private void OnStabilized(IntPtr context, IntPtr table)
{
Interop.IpHlpApi.FreeMibTable(table);
// Lock the TeredoHelper instance to ensure that only the first call to OnStabilized will get to call
// RunCallback. This is the only place that TeredoHelpers get locked, as individual instances are not
// exposed to higher layers, so there's no chance for deadlock.
if (!_runCallbackCalled)
{
lock (this)
{
if (!_runCallbackCalled)
{
_runCallbackCalled = true;
ThreadPool.QueueUserWorkItem(RunCallback, null);
}
}
}
}
}