public static bool bgl_condvar_timed_wait(condvar c, mutex o, int ms) { lock( c ) { try { bool res; bgl_mutex_unlock( o ); res = Monitor.Wait(c, ms); bgl_mutex_lock( o ); return res; } catch(Exception) { return false; } } }
public static bool bgl_condvar_wait(condvar c, mutex o) { lock( c ) { try { bgl_mutex_unlock( o ); Monitor.Wait(c); bgl_mutex_lock( o ); return true; } catch(Exception) { return false; } } }
public static bool bgl_mutex_unlock(mutex o) { return o.release_lock(); }
public static bool bgl_mutex_timed_lock(mutex o, int tmt) { return o.acquire_timed_lock(tmt); }
public static Object bgl_mutex_state(mutex o) { return o.state(); }
public static Object BGL_MUTEX_NAME(mutex o) { return o.name; }
public static bool bgl_mutex_lock(mutex o) { return o.acquire_lock(); }