go/src/sync
Rhys Hiltner f72196647e sync: throw, not panic, for unlock of unlocked mutex
This was originally done in https://golang.org/cl/31359 but partially
undone (apparently unintentionally) in https://golang.org/cl/34310

Fix it, and update tests to ensure the error is unrecoverable.

Fixes #23039

Change-Id: I923ebd613a05e67d8acce77f4a68c64c8574faa6
Reviewed-on: https://go-review.googlesource.com/82656
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
2017-12-08 13:40:21 +00:00
..
atomic sync/atomic: remove noCopy from Value 2017-12-01 16:38:53 +00:00
cond.go all: change github.com issue links to golang.org 2017-11-04 04:13:41 +00:00
cond_test.go
example_pool_test.go
example_test.go
export_test.go sync: deflake TestPool and TestPoolNew 2017-06-28 22:02:07 +00:00
map.go sync: delete a sentence from the Map docs 2017-07-21 22:00:47 +00:00
map_bench_test.go sync: release m.mu during (*RWMutexMap).Range callbacks in sync_test 2017-07-20 18:51:09 +00:00
map_reference_test.go sync: release m.mu during (*RWMutexMap).Range callbacks in sync_test 2017-07-20 18:51:09 +00:00
map_test.go sync: really test DeepCopyMap 2017-04-30 14:17:36 +00:00
mutex.go sync: throw, not panic, for unlock of unlocked mutex 2017-12-08 13:40:21 +00:00
mutex_test.go sync: throw, not panic, for unlock of unlocked mutex 2017-12-08 13:40:21 +00:00
once.go
once_test.go
pool.go
pool_test.go sync: deflake TestPool and TestPoolNew 2017-06-28 22:02:07 +00:00
runtime.go
runtime_sema_test.go
rwmutex.go runtime: add read/write mutex type 2017-06-19 17:40:38 +00:00
rwmutex_test.go runtime: add read/write mutex type 2017-06-19 17:40:38 +00:00
waitgroup.go all: join some chained ifs to unindent code 2017-08-29 20:57:41 +00:00
waitgroup_test.go