#include <xtd/threading/monitor>
#include <xtd/threading/thread>
#include <xtd/console>
#include <xtd/lock>
#include <xtd/startup>
namespace monitor_lock_example {
class program {
public:
static void main() {
}
}
}
private:
static void worker() {
}
}
};
}
startup_(monitor_lock_example::program::main);
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static void pulse(const object_t &obj)
Notifies a thread in the waiting queue of a change in the locked object's state.
Definition monitor.hpp:209
static bool wait(const object_t &obj, int32 milliseconds_timeout)
Releases the lock on an object and blocks the current thread until it reacquires the lock....
Definition monitor.hpp:378
static thread & current_thread() noexcept
Gets the currently running thread.
static thread start_new(const xtd::threading::thread_start &start)
Create and immedialtely start a xtd::threading::thread with specified method.
static void sleep(int32 milliseconds_timeout)
Suspends the current thread for a specified time.
static void join_all()
Blocks the calling thread until all joinable threads terminate.
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:167
#define lock_(object)
The lock_ keyword marks a statement block as a critical section by obtaining the mutual-exclusion loc...
Definition lock.hpp:85
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