public void GetThreadInfo(TargetMemoryAccess target, GetThreadInfoFunc func) { try { mutex.Lock(); this.target = target; mono_debugger_thread_db_iterate_over_threads( handle, delegate(IntPtr th) { long tid, tls, lwp; if (!mono_debugger_thread_db_get_thread_info( th, out tid, out tls, out lwp)) { return(false); } func((int)lwp, tid); return(true); }); } finally { this.target = null; mutex.Unlock(); } }
public void GetThreadInfo(TargetMemoryAccess target, GetThreadInfoFunc func) { try { mutex.Lock (); this.target = target; mono_debugger_thread_db_iterate_over_threads ( handle, delegate (IntPtr th) { long tid, tls, lwp; if (!mono_debugger_thread_db_get_thread_info ( th, out tid, out tls, out lwp)) return false; func ((int) lwp, tid); return true; }); } finally { this.target = null; mutex.Unlock (); } }