How do you terminate a thread which is continuously executing?

1 Answer

Answer :

A thread that is continuously executing has an infinite loop. Toterminate that thread you must break that loop by providing asuitable terminating condition. If the thread is a "worker" thread,the main thread should signal all worker threads to terminate whenthe main thread terminates. The main thread should remain activeuntil all worker threads have successfully terminated.

Related questions

Description : State whether the following statement is true. i) It takes less time to terminate a thread than a process. ii) Threads enhance efficiency in communication between different executing programs. A) i-True, ii-False B) i-True, ii-True C) i-False, ii-True D) i-False, ii-False

Last Answer : B) i-True, ii-True

Description : Speaking of atrocities, how was Taco Bell allowed to brutally terminate the career of that chihuahua?

Last Answer : “Yo quiero Taco Bell”

Description : If one finds the automaton they created to be a nuisance would they have exclusive right to terminate it?

Last Answer : answer:Like we’ve already discussed: If you cause something that is sentient and sapient to die, that is murder. If you couldn’t do it to your children, you can’t do it to your android.

Description : How severe would health problems have to be for you to terminate a pregnancy?

Last Answer : answer:God love the March of Dimes for their efforts to prevent parents from being faced with such a horrible decision. I can't give an honest answer, because I really don't know, never having had faced anything ... I would .then I think of Stephen Hawkings .. I don't know. I honestly don't know ..

Description : Why does my DCOm server process launcher need to terminate unexpectedly 25 times a day?

Last Answer : Uh.. it told you to install Malware? lol ..... that has to be some kind of joke.. open command prompt and type chkdsk /f it will tell you the disk is in use and ask if you want to ... Something could be moved too far in the hard drive for your hardware to process.. this is a good place to start

Description : Which of the following is an optional section of IGES format? a.Start section b.Global section c.Terminate section d.Flag section

Last Answer : d.Flag section

Description : What do these survey site terms like 'quality terminate', 'quota full' mean?

Last Answer : Hiya!To answer your question:Quality Terminate - This means that the survey from the respondent was terminate due to the system detecting some irregularities in the quality of the response. The quality controls ... survey terminologies.Check it out! It's great! Hope this helped! Cheers, mate! :)

Description : Does this have any more serious consequences? Do I have to pay some penalty or do I simply leave after downloading the 30 day notice period?

Last Answer : Premature termination of a fixed-term employment relationship ... (60 days notice is stipulated in the employment contract.) ... so if I terminate while on leave, the contractual period is 60 days ....   

Description : How do you terminate a 401k plan?

Last Answer : The details of how to terminate a 401k plan should be included in the plan itself. Depending on the plan there may be limitations or fines involved in actually terminating the plan itself.

Description : Antianginal drugs afford the following benefit/benefits (a) Terminate anginal attacks (b) Decrease the frequency of anginal attacks (c) Retard the progression of coronary artery disease (d) Both (a) and (b)

Last Answer : Ans: D

Description : The following drug is used to reduce the frequency of angina pectoris as well as to terminate an acute attack (a) Digoxin (b) Furosemide (c) Enalapril (d) Amrinone

Last Answer : Ans: A

Description : The action performed by a ___________ structure must eventually cause the loop to terminate. a) sequence b) case c) repetition d) process

Last Answer : Answer: c Explanation: The action performed by a repetition structure must eventually cause the loop to terminate. Otherwise, an infinite loop is created

Description : Find the load impedance that must be used to terminate RG-62A/U to avoid reflections? A. 93Ω B. 75Ω C. 50Ω D. 300Ω

Last Answer : A. 93Ω

Description : The use of telecommunication for the transmission of signals to initiate, modify or terminate functions of equipment at a distance. A. Tracking B. space command C. Telecommand D. Trunking

Last Answer : C. Telecommand

Description : The use of telecommunication for the transmission of signals to initiate, modify or terminate functions of equipment at a distance. A. Tracking B. Telemetry C. Telecommand D. Space telemetry

Last Answer : C. Telecommand

Description : Imprisonment for non-payment of fine shall terminate (a) On payment of fine (b) On expiry of the term of imprisonment for non-payment (c) both (a) & (b) (d) neither (a) nor (b).

Last Answer : (c) both (a) & (b)

Description : An algorithm is complete if ____________ a) It terminates with a solution when one exists b) It starts with a solution c) It does not terminate with a solution d) It has a loop

Last Answer : a) It terminates with a solution when one exists

Description : When will Hill-Climbing algorithm terminate? a) Stopping criterion met b) Global Min/Max is achieved c) No neighbor has higher value d) All of the mentioned

Last Answer : c) No neighbor has higher value

Description : When will Hill-Climbing algorithm terminate? A : Stopping criterion met B : Global Min/Max is achieved C : No neighbour has higher value D : no criteria to terminate

Last Answer : C : No neighbour has higher value

Description : The lateral spinothalamic tract: a. carries fibres which terminate in the thalamus b. contains mainly the second-order neurones. c. carries fibres that carry information on temperature and pain d. all above

Last Answer : all above

Description : The axons of the Purkinje cells in the cerebellar cortex: a. terminate in excitatory synapses b. terminate in cerebellar nuclei c. terminate in the spinal cord. d. form the main efferent pathway from the cerebellar cortex

Last Answer : terminate in cerebellar nuclei

Description : C fibres transmitting pain sensation a. are present in less numbers than A fibres in sensory nerves b. conduct at an average velocity of 2 metres/secon c. convey temperature sensation d. terminate in laminae 2 and 3 of the dorsal horn

Last Answer : convey temperature sensation

Description : The decimal expansion of the rational number 23/(2 2 . 5) will terminate after (a) one decimal place (b) two decimal places (c) three decimal places (d) more than 3 decimal places

Last Answer : (b) two decimal places

Description : Cells in G0 phase (a) terminate the cell cycle (b) exit the cell cycle (c) enter the cell cycle (d) suspend the cell cycle.

Last Answer : b) exit the cell cycle

Description : Which one of the following codons would terminate translation? a. AUG b. UUU c. UAA d. UGG

Last Answer : c. UAA

Description : Pick up the correct statement from the following: (A) Cavity of a cavity wall should start near ground level (B) Cavity of a cavity wall should terminate near eaves level of sloping roof (C) Cavity of a cavity wall should terminate near coping of flat roof with parapet wall (D) All the above

Last Answer : Answer: Option D

Description : Closing entries are made a. in order to terminate the business as an operating entity. b. so that all assets, liabilities, and Stockholders' equity accounts will have zero balances when the ... ) and dividends to the retained earnings account. d. so that financial statements can be prepared.

Last Answer : c. in order to transfer net income (or loss) and dividends to the retained earnings account. unt.

Description : By using ................... you can force immediate termination of a loop, by passing the conditional expression and any remaining code in the body of the loop. A) Break B) Continue C) Terminate D) Loop Close

Last Answer : A) Break

Description : A data flow can A) Only emanate from an external entity B) Only terminate in an external entity C) May emanate and terminate in an external entity D) May either emanate or terminate in an external entity but not both

Last Answer : C) May emanate and terminate in an external entity

Description : A stipulation which is essential to the main purpose of the contract and if proved false, gives the buyer a right to terminate the contract, is legally known as A. Condition B. Warranty C. Guarantee D. None of these

Last Answer : A. Condition

Description : Antianginal drugs afford the following benefit/benefits: A. Terminate anginal attacks B. Decrease the frequency of anginal attacks C. Retard the progression of coronary artery disease D. Both ‘A’ and ‘B’ are correct

Last Answer : D. Both ‘A’ and ‘B’ are correct

Description : The following drug is used to reduce the frequency of angina pectoris as well as to terminate an acute attack: A. Isosorbide dinitrate B. Pentaerythritol tetranitrate C. Diltiazem D. Dipyridamole

Last Answer : A. Isosorbide dinitrate

Description : A stipulation which is essential to the main purpose of the contract and if prove false give the buyer a right terminate the contract is legally known as a) guarantee b)condition c) warranty d)none of these

Last Answer : c) warranty

Description : Which of the following statement is incorrect? a. An agency may be terminated by death of either party. b. An agency may be terminated by express agreement. c. An agency agreement can always be terminated by a principal. d. Mental incapability of an agent will terminate the agency relationship.

Last Answer : c. An agency agreement can always be terminated by a principal.

Description : In C++, which system-provided function is called when no handler is provided to deal with an exception? (A) terminate() (B) unexpected() (C) abort() (D) kill()

Last Answer : Answer: A

Description : Why do they wait so long before executing the drug bust?

Last Answer : My guess would be that they need to make sure all their ducks are in a row so the charges stick. I’m really not sure. Seems kind of ridiculous though.

Description : Executing JavaScript in a page retrieved using AJAX?

Last Answer : Would assigning the scripts in page B to an “onload” event handler not work? (I’m new to this, but that seems possible. Forgive my kneejerk response.)

Description : A body is executing simple harmonic motion of amplitude 1 cm. Its velocitywhile passing through the central point is 10 mm/sec. Its frequency will be a.2.99 rps b.2.22 rps c.1 rps d.1.59 rps e.1.77 rps

Last Answer : c. 1 rps

Description : Exercise your visual faculties prior to executing a jump? What is the proverb? -Riddles

Last Answer : Look before you leap.

Description : On the basis of the Table Student, write the output(s) produced by executing the following queries: -Technology

Last Answer : (i)Max(Average)Min(Average)9565(ii)NameShrishtiAdityaRitu RajSaumyaAshutoshAman

Description : What activities occur in the Executing Process Group?

Last Answer : Need answer

Description : Are there any online sites that sells laptops that are capable of executing the most intense multimedia tasks?

Last Answer : Yes, many places sell laptops. I would look at Newegg or Redtag for great deals.

Description : While passing over a suspension bridge, soldiers are not allowed to march in steps. This is (a) To prevent any formation of sharp echo (b) Because there cannot be orderly marching (c) To prevent any occurrence of resonance with the bridge (d) To prevent the bridge from executing forced vibrations

Last Answer : Ans:(c)

Description : Besides representation, the Parliament of India is also a deliberative body with diverse functions. Which one among the following is not a function of the Parliament of India? (1) Ventilating ... (3) Holding the government accountable for its actions and expenditure (4) Amending the Constitution

Last Answer : (2) Executing major policy decisions Explanation: Our Parliamentary system blends the legislative and the executive organs of the State in as much as the executive power is wielded by a group of Members of the Legislature who command majority in the Lok Sabha.

Description : The process of Control Procurements falls under which process group A. Planning B. Closing C. Monitoring and Control D. Executing

Last Answer : C. Monitoring and Control

Description : When a project manager starts to plan a new project budget, the cost  of which project management process group is expected to be lowest? Select one: a. Initiating b. Executing c. Monitoring and controlling d. Closing e. Planning

Last Answer : d. Closing

Description : “Devising and maintaining a workable scheme to accomplish the business need” is (A)Initiating process (B)Planning process (C)Executing process (D)Controlling proces

Last Answer : (B)Planning process

Description : Which of the following processes serve as inputs to each other?  A. Executing, and Monitoring and Controlling B. Executing and Closing C. Planning, and Monitoring and Controlling D. Executing and Initiation

Last Answer : A. Executing, and Monitoring and Controlling

Description : What are the 5 major processes of project management?  A. Closing, Executing, Planning, Monitoring and Controlling, Initiating (Ans.)  B. Starting, Closing, Managing, Planning, ... Finishing, Monitoring and Controlling, Executing, Planning D. Starting, Finishing, Executing, Managing, Closing

Last Answer : A. Closing, Executing, Planning, Monitoring and Controlling, Initiating (Ans.)