Concurrency Primitives
Async locks, counting semaphores, object pools with idle timeout, parallel iteration helpers (par_map / promise-pool / parallel-each), abortable signals with race + timeout, graceful-shutdown orchestrators, panic-free channel utilities, run-once + singleton decorators. The toolkit underneath any service that does more than one thing at a time without corrupting shared state.
Projects
Packages (45)
- @philiprehberger/dart-debouncedart
Debounce and throttle utilities with Stream transformers and cancellation
- @philiprehberger/dotnet-async-lockdotnet
Async-aware synchronization primitives — AsyncLock, AsyncSemaphore, and AsyncOnce for safe mutual exclusion.
- @philiprehberger/dotnet-background-task-queuedotnet
Simple in-memory background job queue for ASP.NET Core with concurrency control.
- @philiprehberger/dotnet-cache-kitdotnet
Thread-safe in-memory cache for .NET — LRU/LFU eviction, TTL expiration, tag-based invalidation, cache warming, and configurable max size.
- @philiprehberger/dotnet-disposerdotnet
Composite disposable container that disposes multiple IDisposable/IAsyncDisposable objects in reverse order.
- @philiprehberger/dotnet-pollingdotnet
Poll any async operation until a condition is met with configurable intervals, timeouts, and backoff strategies.
- @philiprehberger/dotnet-task-dependency-runnerdotnet
Lightweight task runner with dependency graph resolution and parallel execution.
- @philiprehberger/go-batchgo
Batch processing and chunking utilities for Go. Generic, concurrent, zero dependencies
- @philiprehberger/go-gracefulgo
Graceful shutdown orchestrator for Go services. Register hooks with priorities, drain in order
- @philiprehberger/go-safechango
Safe channel utilities for Go with panic-free send/receive, context-aware communication, and combinators
- @philiprehberger/kt-graceful-shutdownkotlin
Graceful application shutdown with signal handling and ordered teardown.
- @philiprehberger/kt-task-queuekotlin
In-process async task queue with concurrency control and retry.
- @philiprehberger/kt-worker-poolkotlin
Coroutine-based worker pool for parallel batch processing with backpressure.
- @philiprehberger/py-dipython
Lightweight dependency injection container for Python.
- @philiprehberger/py-dict-mergepython
Deep merge dictionaries safely with conflict resolution.
- @philiprehberger/py-diff-stringspython
Show character-level differences between two strings with colored terminal output.
- @philiprehberger/py-dir-snapshotpython
Filesystem state snapshots with diff comparison
- @philiprehberger/py-lock-runpython
Prevent duplicate script execution using file-based locking
- @philiprehberger/py-oncepython
Ensure a function runs only once, regardless of how many times it's called.
- @philiprehberger/py-progress-mappython
Parallel map with a built-in terminal progress bar
- @philiprehberger/py-run-parallelpython
Run multiple functions in parallel and collect results with the simplest possible API
- @philiprehberger/py-singletonpython
Thread-safe singleton and multiton pattern decorators.
- @philiprehberger/rb-dependency-graphruby
Dependency resolver with topological sort and parallel batch scheduling
- @philiprehberger/rb-expiring-mapruby
Thread-safe hash with per-key TTL and automatic expiration
- @philiprehberger/rb-job-meterruby
Framework-agnostic background job instrumentation and metrics
- @philiprehberger/rb-lock-kitruby
File-based and PID locking for process coordination with TTL expiration, stale detection, read-write locks, and lock owner identification
- @philiprehberger/rb-lruruby
Thread-safe LRU cache with TTL, eviction callbacks, and hit/miss statistics
- @philiprehberger/rb-memoruby
Practical memoization with TTL, LRU eviction, and thread-safety
- @philiprehberger/rb-parallel-eachruby
Parallel iteration with configurable thread pool and ordered results
- @philiprehberger/rb-poolruby
Generic thread-safe object pool with idle timeout and health checks
- @philiprehberger/rb-queue-stackruby
Thread-safe Queue and Stack with capacity limits and blocking operations
- @philiprehberger/rb-semaphoreruby
Counting semaphore for concurrent access control with timeouts
- @philiprehberger/rb-state-bagruby
Thread-local state bag for implicit context propagation
- @philiprehberger/rb-state-machineruby
Lightweight state machine DSL with transitions, guards, callbacks, history tracking, auto-transitions, parallel states, statistics, and graph export
- @philiprehberger/rb-task-queueruby
In-process async job queue with concurrency control
- @philiprehberger/rb-token-bucketruby
Thread-safe token bucket rate limiter with configurable capacity, refill rate, and refill strategy
- @philiprehberger/rs-event-busrust
Thread-safe event bus with typed listeners for Rust
- @philiprehberger/rs-parallelrust
Easy parallel iteration — par_map, par_filter, par_for_each with progress and error collection
- @philiprehberger/rs-task-queuerust
In-process thread-based task queue with priority and concurrency control
- @philiprehberger/swift-keychain-kitswift
Modern, type-safe Keychain wrapper with Codable, biometric auth, and async/await
- @philiprehberger/abort-kittypescript
AbortController utilities — timeout, race, linked signals
- @philiprehberger/async-queuetypescript
Priority queue for async tasks with concurrency control
- @philiprehberger/promise-pooltypescript
Concurrent promise execution with configurable pool size
- @philiprehberger/task-queuetypescript
In-process async job queue with concurrency control, priorities, and retries
- @philiprehberger/ts-disposable-pooltypescript
Generic async resource pool with acquire/release, validation, and auto-scaling