You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Reset signal should be done under mutex otherwise there could be a race between the time we call Render which resets the signals and the time we call Stop which uses the context cancellation function
To Reproduce
Run Render in a go routine and then immediately run Stop
Expected behavior
It is not enough to check renderInProgress under mutex, initForRender should happen also under the mutex which will probably resolve this race
Screenshots
WARNING: DATA RACE
Read at 0x00c00033c2b8 by goroutine 43:
github.com/jedib0t/go-pretty/v6/progress.(*Progress).Stop()
/home/niro/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/progress/progress.go:288 +0x44
...
Previous write at 0x00c00033c2b8 by goroutine 45:
github.com/jedib0t/go-pretty/v6/progress.(*Progress).initForRender()
/home/niro/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/progress/progress.go:319 +0x2b2
github.com/jedib0t/go-pretty/v6/progress.(*Progress).Render()
/home/niro/go/pkg/mod/github.com/jedib0t/go-pretty/[email protected]/progress/render.go:16 +0x54
...
Software (please complete the following information):
OS: Ubuntu
GoLang Version 1.21
The text was updated successfully, but these errors were encountered:
Describe the bug
Reset signal should be done under mutex otherwise there could be a race between the time we call Render which resets the signals and the time we call Stop which uses the context cancellation function
To Reproduce
Run Render in a go routine and then immediately run Stop
Expected behavior
It is not enough to check
renderInProgress
under mutex, initForRender should happen also under the mutex which will probably resolve this raceScreenshots
Software (please complete the following information):
The text was updated successfully, but these errors were encountered: