| 12464 | |
| 12465 | |
| 12466 | void Line::PauseUnderlyingThread(bool aTrueForPauseFalseForUnpause) |
| 12467 | { |
| 12468 | if (g <= g_array) // Guard against underflow. This condition can occur when the script thread that called us is the AutoExec section or a callback running in the idle/0 thread. |
| 12469 | return; |
| 12470 | if (g[-1].IsPaused == aTrueForPauseFalseForUnpause) // It's already in the right state. |
| 12471 | return; // Return early because doing the updates further below would be wrong in this case. |
| 12472 | g[-1].IsPaused = aTrueForPauseFalseForUnpause; // Update the pause state to that specified by caller. |
| 12473 | if (aTrueForPauseFalseForUnpause) // The underlying thread is being paused when it was unpaused before. |
| 12474 | ++g_nPausedThreads; // For this purpose the idle thread is counted as a paused thread. |
| 12475 | else // The underlying thread is being unpaused when it was paused before. |
| 12476 | --g_nPausedThreads; |
| 12477 | } |
| 12478 | |
| 12479 | |
| 12480 |
nothing calls this directly
no outgoing calls
no test coverage detected