Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what should i do for the last todo's here : } / / / / / / / / / / / / / /

what should i do for the last todo's here : }
///////////////////////////////////////////////////////////////////////////////////
// TODO:: let detached threads know they need to shut down using the flag you
// created in the thread structure. You may only set the flag once here (you should
// not have more than one flag) and it must be in a thread safe manner.
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
// TODO:: Wait for all detached threads to finish without using a busy-wait loop.
// You must wait for the number of threads to change before checking again to avoid
// wasting CPU cycles.
//(HINT: Remember there is a specific object that can Wait for a Condition)
///////////////////////////////////////////////////////////////////////////////////

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Understand corporate and HRM strategy.

Answered: 1 week ago