Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to pause and resume the execution of a goroutine #2262

Closed
pellared opened this issue Dec 11, 2020 · 1 comment
Closed

Allow users to pause and resume the execution of a goroutine #2262

pellared opened this issue Dec 11, 2020 · 1 comment

Comments

@pellared
Copy link

pellared commented Dec 11, 2020

One of the features that I miss the most is the possibility of pausing and then resuming the execution of a goroutine.

The race detector does not cover all possible cases - e.g. when the issue is "correct" from memory+execution perspective but invalid from "acceptance" perspective. Meaning there can be a valid concurrent program which simply does not what we expected.

Before I was developing mainly in C# and I was using https://docs.microsoft.com/pl-pl/visualstudio/debugger/how-to-use-the-threads-window?view=vs-2019#freeze-and-thaw-thread-execution to analyze such problems.

If pausing/resuming the execution of a goroutine is not possible maybe it would be enough even to allow doing it for the thread running current goroutine?

@pellared pellared changed the title Allow users to pause/freeze + continue/thaw execution of a goroutine Allow users to pause and resume the execution of a goroutine Dec 11, 2020
@aarzilli
Copy link
Member

This is basically a duplicate of #1529 (technically it's a superset of that, but I'm still going to close it as duplicate). The bottom line is that it can't be done without assistance from the runtime, even freezing a single thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants