In this article we will discuss the usage of Condition Variable in C++11 Multi-threading with example.
In this article we will discuss the need of Event Handling in Multi-threading.
In this article we will discuss how to use mutex locks to protect shared data in multithreaded environment and avoid race conditions.
In multithreading environment data sharing between threads is very easy. But this easy sharing of data can cause problems in application. One such problem is Race Condition.
To Pass arguments to thread’s associated callable object or function just pass additional arguments to the std::thread constructor. By default all arguments are copied into the internal storage of...
Joining Threads: Once a thread is started then another thread can wait for this new thread to finish. For this another need need to call join() function on the...
Introduction to C++11 Thread Library Original C++ Standard supported only single thread programming. The new C++ Standard (referred to as C++11 or C++0x) was published in 2011. In C++11...
std::find and std::find_if algorithms are used to find first element in the given range.
Main advantage of shared_ptr is that it automatically releases the associated memory when not used any more.
We should create shared_ptr objects carefully. Checkout below two cases,