System::Threading::Monitor::TryEnter 方法

Monitor::TryEnter(const SharedPtr<Object>&) method

尝试获取对指定对象的独占锁(未实现)。

static bool System::Threading::Monitor::TryEnter(const SharedPtr<Object> &obj)

另见

Monitor::TryEnter(const SharedPtr<Object>&, int32_t) method

尝试在指定的毫秒数内获取对指定对象的独占锁(未实现)。

static bool System::Threading::Monitor::TryEnter(const SharedPtr<Object> &obj, int32_t millisecondsTimeout)

另见

Monitor::TryEnter(const SharedPtr<Object>&, TimeSpan) method

尝试在指定的时间内获取对指定对象的独占锁(未实现)。

static bool System::Threading::Monitor::TryEnter(const SharedPtr<Object> &obj, TimeSpan timeout)

另见

Monitor::TryEnter(const System::SharedPtr<Object>&, bool&) method

尝试获取对指定对象的独占锁,并原子性地设置一个指示锁是否已获取的值。

static void System::Threading::Monitor::TryEnter(const System::SharedPtr<Object> &obj, bool &lockTaken)

另见

Monitor::TryEnter(const System::SharedPtr<Object>&, int32_t, bool&) method

尝试在指定的时间内获取对指定对象的独占锁,并原子性地设置一个指示锁是否已获取的值。

static void System::Threading::Monitor::TryEnter(const System::SharedPtr<Object> &obj, int32_t millisecondsTimeout, bool &lockTaken)

另见

Monitor::TryEnter(const System::SharedPtr<Object>&, TimeSpan, bool&) method

尝试在指定的时间内获取对指定对象的独占锁,并原子性地设置一个指示锁是否已获取的值。

static void System::Threading::Monitor::TryEnter(const System::SharedPtr<Object> &obj, TimeSpan timeout, bool &lockTaken)

另见