log: improve the most common use case (#19242)

This commit is contained in:
Delyan Angelov 2023-08-31 06:44:11 +03:00 committed by GitHub
parent 55575fd7bd
commit 6fb4a481f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 576 additions and 150 deletions

11
vlib/sync/common_mutex.v Normal file
View file

@ -0,0 +1,11 @@
module sync
// str returns a string representation of the Mutex pointer
pub fn (m &Mutex) str() string {
return 'Mutex(${voidptr(m)})'
}
// str returns a string representation of the RwMutex pointer
pub fn (m &RwMutex) str() string {
return 'RwMutex(${voidptr(m)})'
}