Go: Story of TryLock Function
Go 1.18 comes with a new function TryLock (for the mutexes sync.Mutex and sync.RWMutex) that allows the developer to try acquiring a lock in a non-blocking mode, i.e. if the lock is already acquired…
Source: medium.com