Click here to Skip to main content
15,913,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If there are 2 threds are running,, and in between 1 thread crashes while accesing resource. But other thread will be waiting for the thread to release ryt ?How application responds?

What I have tried:

I did not tried anything. I dont know how application responds
Posted
Updated 16-Apr-16 22:39pm

1 solution

1. You should handle the access to the resource smoothly, so the thread doesnt crash. There is always some API which makes it possible.

2. Else you should detect the crash and handle the crash with some crash handling like try-catch block and decide what to do.

3. Maybe a global data which all the threads can access. And than restart the thread.

It is all to unspecific for a more detailed answer.
 
Share this answer
 
Comments
Member 11520335 17-Apr-16 5:55am    
1. You should handle the access to the resource smoothly, so the thread doesnt crash. There is always some API which makes it possible. Do you know any API for tht ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900