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
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
N/A
What did you do?
Assuming that there are some structure which has Open and Close method. Some initial stuff should be done for only once - so they share a sync.Once to do this.
What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?N/A
What did you do?
Assuming that there are some structure which has
Open
andClose
method. Some initial stuff should be done for only once - so they share async.Once
to do this.But in this case,
St
can not be opened again after closed because the "sync.Once.Do()" is actually run once.What did you expect to see?
I hope this struct can be opened for multiple times, I think adding a
Reset
method is an idea - then we can reset theopenOnce
in theClose
method.What did you see instead?
There is not a method to reset the state of
sync.Once
.The text was updated successfully, but these errors were encountered: