Skip to content

Portgas-D-Asce/DistributedLock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DistributedLock

基于 Redis Hash 类型实现的 “支持防死锁,自动续期的分布式递归锁”。

dependency

necessary

optional

usage

find_package(distributed_lock 1.0.0 QUIET)
if (NOT distributed_lock_FOUND)
    include(FetchContent)
    fetchcontent_declare(distributed_lock
        GIT_REPOSITORY https://github.com/Portgas-D-Asce/DistributedLock.git
        GIT_TAG v1.0.0-alpha
    )
    fetchcontent_makeavailable(distributed_lock)
    # 拉取失败
    if(NOT distributed_lock_POPULATED)
        message(FATAL_ERROR "fetch distributed_lock failed!")
    endif ()
endif ()

target_link_libraries(exec
    PUBLIC
    $<$<BOOL:${distributed_lock_FOUND}>:distributed_lock::>redis_lock
)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published