conncache: various concept cleanups

More connection cache accesses are protected by locks.

CONNCACHE_* is a beter prefix for the connection cache lock macros.

Curl_attach_connnection: now called as soon as there's a connection
struct available and before the connection is added to the connection
cache.

Curl_disconnect: now assumes that the connection is already removed from
the connection cache.

Ref: #4915
Closes #5009
This commit is contained in:
Daniel Stenberg 2020-04-27 00:33:21 +02:00
parent 9a8fa076bf
commit c069027139
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 139 additions and 127 deletions

View file

@ -29,6 +29,12 @@ run 1: foobar and so on fun!
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
run 1: foobar and so on fun!
-> Mutex lock
<- Mutex unlock
@ -40,6 +46,10 @@ run 1: foobar and so on fun!
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
run 1: foobar and so on fun!
-> Mutex lock
<- Mutex unlock
@ -51,6 +61,10 @@ run 1: foobar and so on fun!
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
-> Mutex lock
<- Mutex unlock
run 1: foobar and so on fun!
-> Mutex lock
<- Mutex unlock