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

View file

@ -92,10 +92,6 @@ pub fn (mut m RwMutex) unlock() {
C.ReleaseSRWLockExclusive(&m.mx)
}
pub fn (mut m Mutex) destroy() {
// nothing to do
}
[inline]
pub fn new_semaphore() &Semaphore {
return new_semaphore_init(0)
@ -208,5 +204,14 @@ pub fn (mut sem Semaphore) timed_wait(timeout time.Duration) bool {
return res != 0
}
pub fn (s Semaphore) destroy() {
pub fn (mut m RwMutex) destroy() {
// nothing to do
}
pub fn (mut m Mutex) destroy() {
// nothing to do
}
pub fn (s Semaphore) destroy() {
// nothing to do
}