From 36b07a47657646aaf487ec94bead43bbb2d4a035 Mon Sep 17 00:00:00 2001 From: Geolffrey Mena Date: Fri, 10 Jun 2022 20:58:06 -0600 Subject: [PATCH] Update read_write_lock.md --- synchronization/read_write_lock.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synchronization/read_write_lock.md b/synchronization/read_write_lock.md index 024d7ec..156236f 100644 --- a/synchronization/read_write_lock.md +++ b/synchronization/read_write_lock.md @@ -100,11 +100,11 @@ go func(r *Router){ // ...some code here // reading operation 1 -connection := r.Query("192.168.1.1:8080") +connection := router.Query("192.168.1.1:8080") //... more code here // reading operation 2 -otherQuery:= r.Query("192.168.1.1:8081") +otherQuery:= router.Query("192.168.1.1:8081") // read locks are like counters.. until counter = 0 Write can be acquired ```