All Projects → TrevorS → keyway

TrevorS / keyway

Licence: other
A simple Bash lock file library.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to keyway

Jxpatternlock
An easy-to-use, powerful, customizable pattern lock view in swift. 图形解锁/手势解锁 / 手势密码 / 图案密码 / 九宫格密码
Stars: ✭ 165 (+489.29%)
Mutual labels:  lock
Javainterview
java中高级基础指南
Stars: ✭ 222 (+692.86%)
Mutual labels:  lock
activejob-uniqueness
Unique jobs for ActiveJob. Ensure the uniqueness of jobs in the queue.
Stars: ✭ 194 (+592.86%)
Mutual labels:  lock
Java Concurrency Examples
Java Concurrency/Multithreading Tutorial with Examples for Dummies
Stars: ✭ 173 (+517.86%)
Mutual labels:  lock
Pottery
Redis for humans. 🌎🌍🌏
Stars: ✭ 204 (+628.57%)
Mutual labels:  lock
LockView
一个自定义的多功能的锁屏页解锁控件
Stars: ✭ 17 (-39.29%)
Mutual labels:  lock
Lock Threads
GitHub Action that locks closed issues and pull requests after a period of inactivity
Stars: ✭ 156 (+457.14%)
Mutual labels:  lock
aud
Use `npx aud` instead of `npm audit`, whether you have a lockfile or not!
Stars: ✭ 24 (-14.29%)
Mutual labels:  lockfile
Lock.swift
A Swift & iOS framework to authenticate using Auth0 and with a Native Look & Feel
Stars: ✭ 215 (+667.86%)
Mutual labels:  lock
async
Synchronization and asynchronous computation package for Go
Stars: ✭ 104 (+271.43%)
Mutual labels:  lock
React Focus On
🎯 Solution for WAI ARIA compatible modal dialogs or full-screen tasks, you were looking for
Stars: ✭ 180 (+542.86%)
Mutual labels:  lock
Concurrent
Functional Concurrency Primitives
Stars: ✭ 206 (+635.71%)
Mutual labels:  lock
ES-Timer
A USB timer powered by Digispark ATtiny85 according to 🍅 pomodoro time management technique
Stars: ✭ 45 (+60.71%)
Mutual labels:  lock
Aioredlock
🔒 The asyncio implemetation of Redis distributed locks
Stars: ✭ 171 (+510.71%)
Mutual labels:  lock
ci
Run npm ci using the appropriate Node package manager (npm, yarn, pnpm)
Stars: ✭ 39 (+39.29%)
Mutual labels:  lock
Easy
开源的Java开发脚手架,工作经验总结,springboot,springcloud,基于tk-mybatis代码反向生成,基于redis(redisson)注解形式加分布式锁等,计划将用该脚手架抄袭jeesite和ruoyi还有基于vue的后台权限管理系统做一套开源的后台管理和cms系统,域名服务器已买好,脚手架还在继续更新中,更新完毕开始更新easysite
Stars: ✭ 160 (+471.43%)
Mutual labels:  lock
php-fslock
A simple lock implementation using flock.
Stars: ✭ 18 (-35.71%)
Mutual labels:  lock
phpchartjs
A PHP library that makes it easy to generate data for ChartJS.
Stars: ✭ 24 (-14.29%)
Mutual labels:  lock
pip-deepfreeze
A simple pip freeze workflow for Python application developers
Stars: ✭ 21 (-25%)
Mutual labels:  lockfile
django-concurrency-talk
🎭 Database Integrity in Django: Safely Handling Critical Data in Distributed Systems
Stars: ✭ 49 (+75%)
Mutual labels:  lock
dP
88
88  .dP  .d8888b. dP    dP dP  dP  dP .d8888b. dP    dP
88888"   88ooood8 88    88 88  88  88 88'  `88 88    88
88  `8b. 88.  ... 88.  .88 88.88b.88' 88.  .88 88.  .88
dP   `YP `88888P' `8888P88 8888P Y8P  `88888P8 `8888P88
                       .88                          .88
                   d8888P                       d8888P

Keyway

A simple lock file library.

Features
  • Provides mutual exclusion for scripts that require the same resource.
  • Requires three additional lines of code in your script, including sourcing the library.
  • Scripts using Keyway can be configured to either terminate or busy-wait if a resource is blocked.
  • Keyway will report when an external error was caught and there are lock files in the lock directory.
Usage:
  • acquire_lock_for "your_task_name"
    • If the resource is not locked, your task will execute, otherwise it will terminate.
  • acquire_spinlock_for "your_task_name"
    • If the resource is locked, your task will wait until the lock has been released before acquiring its own lock and executing.
Return Code Explanations:
  1. Your application was not able to acquire lock.
  2. There was some other problem:
    • Keyway could not create the lock directory.
    • Keyway could not create or remove a lock.
  3. An error was caught and there are lock files in the lock directory.
An example:
#!/bin/bash
source keyway_lib.sh

# optionally override the lock file directory
LOCK_DIR="alt-lock-dir"

# attempt to lock the shared resource
acquire_lock_for "your_task_name"

# if the lock was successful, execute the task
echo "executing critical section"

# release the lock when the task is done
release_lock_for "your_task_name"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].