# Timeout task different behavior under different optimization

**URL:** <https://verificationacademy.com/forums/t/timeout-task-different-behavior-under-different-optimization/50883>\
**Category:** SystemVerilog\
**Tags:** fork-join, Race-condition, disable-fork\
**Created:** [July 23, 2025, 10:01am UTC](https://verificationacademy.com/forums/t/timeout-task-different-behavior-under-different-optimization/50883 "2025-07-23T10:01:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dave\_59](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/dave_59/32/4499_2.png) [@dave\_59](https://verificationacademy.com/forums/u/dave_59)\
**Post date:** [July 23, 2025, 3:02pm UTC](https://verificationacademy.com/forums/t/timeout-task-different-behavior-under-different-optimization/50883/2 "2025-07-23T15:02:50Z")

</div>

Please [format your code](https://verificationacademy.com/forums/t/please-format-your-code-with-markdown-tags/28078) making your code easier for others to read. I have done that for you.

What different behaviors are you seeing?

There could be race conditions with the signal’s value when calling the task and when the timeout expires.

Are you sure there are no other differences in tool switches like timescale directives when running in the different modes?

---

_[View the full topic](https://verificationacademy.com/forums/t/timeout-task-different-behavior-under-different-optimization/50883)._
