concurrency

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyedMutex

type KeyedMutex struct {
	// contains filtered or unexported fields
}

KeyedMutex 키별로 독립적인 Mutex를 제공하는 구조체입니다. 서로 다른 키에 대한 작업은 병렬로 처리될 수 있습니다. Reference Counting을 사용하여 사용되지 않는 Mutex를 메모리에서 정리합니다.

func NewKeyedMutex

func NewKeyedMutex() *KeyedMutex

NewKeyedMutex 새로운 KeyedMutex 인스턴스를 생성합니다.

func (*KeyedMutex) Lock

func (km *KeyedMutex) Lock(key string)

Lock 지정된 키에 대한 락을 획득합니다.

func (*KeyedMutex) Unlock

func (km *KeyedMutex) Unlock(key string)

Unlock 지정된 키에 대한 락을 해제합니다. 주의: 반드시 Lock을 호출한 후에 호출해야 합니다.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL