Question regarding sv process::suspend

In reply to Jeff_Li_90:

There are two issues.

First is you have a race condition. At the point when you suspend the second_thread, you don’t know if the 2nd #10 has been scheduled or not. If it has not, then you would get your expected results. But if it had been scheduled, the second issue is a Delay does not work like a timer. A Delay suspends the current process and schedules it to wake up at the appropriate time. The process will remain suspended if you have explicitly suspended it. It does not add time to the scheduled delay.