I have a scenario in which a parent thread spawns multiple task/job threads (done by someone else). At the end, I need to perform one additional task which is unrelated to the job threads.
What I need is to execute this new task (checking for existance of a file on a remove server) for as long as a fixed time, i.e. 30 minutes max, and to repeat the process in a fixed interval, i.e. every 2 minutes, until the condition is satisfied. If the confirmation is succeeded, it should exit back to the main thread (parent -- parent thread needs to wait for this particular task to conclude before terminating).
I am very new to C# multi-threading, if even we need threading for this case. So, can somebody give me a guidance.
Main thread { Child threads0...n All Done For as long as n minutes (R) Every m minute, check for something If succeed, exit If not, continue waiting for m minute, then (R) }