40 template<
class object_t>
41 explicit lock(
const object_t& obj) : obj_(
monitor::get_ptr(obj)) {monitor::enter_ptr(obj_);}
116 monitor::object_ptr obj_;
Contains block_scope_ keyword.
object()=default
Create a new instance of the ultimate base class object.
Provides a mechanism that synchronizes access to objects with xtd::threading::monitor.
Definition lock.hpp:32
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.
bool wait(const time_span &timeout)
Releases the lock on an object and blocks the current thread until it reacquires the lock....
lock(const object_t &obj)
Create a xtd::threading::lock object and acquires an exclusive lock on the specified obj.
Definition lock.hpp:41
void pulse_all()
Notifies all waiting threads of a change in the object's state.
bool wait()
Releases the lock on an object and blocks the current thread until it reacquires the lock.
Provides a mechanism that synchronizes access to objects.
Definition monitor.hpp:129
Contains a constant used to specify an infinite amount of time. This class cannot be inherited.
Definition timeout.hpp:33
Represents a time interval.
Definition time_span.hpp:29
#define core_export_
Define shared library export.
Definition core_export.hpp:13
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
Contains xtd::threading::monitor class.
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.