Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

check for a condition before calling a process (info inside)

$
0
0
Hey everyone. It's my first question here.

I have to simulate deadlock and then solve it. I did the simulating part by calling 3 process to lock text files.
but in order to solve the deadlock, i need to check whether the needed files are available before trying to lock them.

so my question is:

How can I call a process once both it's files are available? cuz it can be done using a while loop, bu then the while loop keeps on running so it can be efficient

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>