Closed xiaox0321 closed 7 years ago
It's not 100% the same actually. This will unlock the table before adding a new item, which could potentially lead to race conditions. The duplicated code still isn't nice obviously. I'd suggest moving the "add"-code into a separate function (that doesn't do the locking) and which gets called by both Add() and NotFoundAdd().
Fixed this in master.
code is repeated