|
|
|
@ -25,7 +25,7 @@ func (this *Monitor[T]) Set (value T) {
|
|
|
|
// Borrow borrows the value from the Monitor, and returns a function that must
|
|
|
|
// Borrow borrows the value from the Monitor, and returns a function that must
|
|
|
|
// immediately be deferred, like this:
|
|
|
|
// immediately be deferred, like this:
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// value, done := Monitor.Borrow()
|
|
|
|
// value, done := monitor.Borrow()
|
|
|
|
// defer done()
|
|
|
|
// defer done()
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// From the time Borrow is called to the time the done function is called, it is
|
|
|
|
// From the time Borrow is called to the time the done function is called, it is
|
|
|