Another interesting case for transferring ownership from one thread to another, however, one thread cannot be assigned to another. Strange, right? Yes, thread ownership may
Tag: C++11
Advantages of thread join method in multithreading with an example
Advantages of thread join method in multithreading with an example. API Join() calling thread is suspended until the function called during construction completes. After all
thread_local a unique data for each thread
One of the primary advantages of utilising threads for concurrency is the ability to quickly and directly transfer data across them, so now that we’ve
mutex in the thread explained in simple examples in detail
A mutex is a locked object that acts as a notification when critical code parts demand exclusive access. It prohibits other threads with the same
Complete guide on how to Pass Arguments to thread and How You Could Use Them With C++
This blog describes how to pass an argument to a thread and which arguments cannot be passed. The first thing we’ll look at is why
Uniform Initialization ( List Initialization ): C++ 11
Topics Covered : Uniform Intializer list Direct list initialization Copy-list-initialization About std::initilizer_list Problem associated with std::initializer_list std::initializer_list for Aggregate
Default Initialization in C++
Default Initialization is the initialization performed when an object is constructed with no initializer. Default initialization occurs in three scenarios:1) when a variable with automatic,
Promise and future in C++
Content: Brief introduction of what is future and promise in C++. Sample code to implement promise and future in C++. Set an exception in promise
Use of shared_future in C++ 11
The shared_future object works similar to std::future except that it can be copied and thereby more than one std::future can share the ownership. The use
Detail understanding and usage of std::async in C++ 11
Agenda: Introduction to std::async. Accessing the shared state of the future. Get a value from parent to child- Full filling promise. set_exception – failed to