Compare commits

...

2 Commits

Author SHA1 Message Date
eebe3d2179 sync: Add monitor tests 2024-12-29 02:32:27 -05:00
6e902df516 sync: Add Monitor.BorrowReturn 2024-12-29 02:32:13 -05:00
2 changed files with 75 additions and 2 deletions

View File

@ -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