6#include "../block_scope.h"
40 template<
typename object_t>
41 explicit lock_guard(
const object_t& obj) : obj_(
monitor::get_ptr(obj)) {monitor::enter_ptr(obj_);}
116 monitor::object_ptr obj_;
181#define lock_guard_(object)\
182 block_scope_(xtd::threading::lock_guard __xtd_lock_guard__(object))
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
Provides a mechanism that synchronizes access to objects with xtd::threading::monitor.
Definition lock_guard.h:32
void pulse_all()
Notifies all waiting threads of a change in the object's state.
bool wait(const time_span &timeout)
Releases the lock on an object and blocks the current thread until it reacquires the lock....
bool wait()
Releases the lock on an object and blocks the current thread until it reacquires the lock.
bool wait(int32 milliseconds_timeout)
Releases the lock on an object and blocks the current thread until it reacquires the lock....
void pulse()
Notifies a thread in the waiting queue of a change in the locked object's state.
lock_guard(const object_t &obj)
Create a xtd::threading::lock_guard object and acquires an exclusive lock on the specified obj.
Definition lock_guard.h:41
Provides a mechanism that synchronizes access to objects.
Definition monitor.h:130
Contains a constant used to specify an infinite amount of time. This class cannot be inherited.
Definition timeout.h:33
#define core_export_
Define shared library export.
Definition core_export.h:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
Contains xtd::threading::monitor class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Represents a time interval.
Definition time_span.h:29