func ( f *Foo) Bar () {
f.lock.lock()
defer f.lock.unlock()
if true {
os.Exit(1)
}
}
this code snippet terminate program directly without releasing mutex, is it safe ? Is there any bad impacts in there ?
func ( f *Foo) Bar () {
f.lock.lock()
defer f.lock.unlock()
if true {
os.Exit(1)
}
}
this code snippet terminate program directly without releasing mutex, is it safe ? Is there any bad impacts in there ?
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.