In reply to Juhi_Patel:
Not exactly sure what you need to do, but you could try
fork
@(cb iff signal == condition);
wait(cycle_cout == something);
join_any
disable fork; // gets rid of other hanging threads
if (cycle_cout == something)
// then you timed out;
else
// otherwise you didn't