Enter()

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

Acquires an exclusive lock on a specified object.

static void System::Threading::Monitor::Enter(const SharedPtr<Object> &obj)

Arguments

ParameterTypeDescription
objconst SharedPtr<Object>&The object on which to acquire the monitor lock.

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

Acquires an exclusive lock on the specified object, and atomically sets a value that indicates whether the lock was taken.

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

See Also