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
as I have known, the redis set operation with "NX" will promise distributed lock, reply, err := redis.String(conn.Do("SET", m.name, value, "NX", "PX", int(m.expiry/time.Millisecond)))
so it confused me, why the Lock and Unlock method need m.nodem.Lock? and will the m.nodem.Lock lead to deadlock?
Hi hjr265,
as I have known, the redis set operation with "NX" will promise distributed lock,
reply, err := redis.String(conn.Do("SET", m.name, value, "NX", "PX", int(m.expiry/time.Millisecond)))
so it confused me, why the
Lock
andUnlock
method needm.nodem.Lock
? and will them.nodem.Lock
lead to deadlock?The text was updated successfully, but these errors were encountered: