All Projects → SentimensRG → sigctx

SentimensRG / sigctx

Licence: other
Go contexts for graceful shutdown

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to sigctx

node-graceful-shutdown
Gracefully shutdown your modular NodeJS application.
Stars: ✭ 20 (-63.64%)
Mutual labels:  graceful-shutdown, graceful
uevloop
A fast and lightweight event loop for embedded platforms.
Stars: ✭ 61 (+10.91%)
Mutual labels:  signals
react-context-global-store
A simple global store based on React context
Stars: ✭ 22 (-60%)
Mutual labels:  context
kms
🔪 Is a library that aids in graceful shutdown of a process/application
Stars: ✭ 44 (-20%)
Mutual labels:  graceful-shutdown
ctx
🍭Ctx (Context) 是一个服务模块化上下文框架。
Stars: ✭ 38 (-30.91%)
Mutual labels:  context
laravel-react-spa
A Laravel-React SPA starter project template.
Stars: ✭ 94 (+70.91%)
Mutual labels:  context
karma-go
Everything has a reason.
Stars: ✭ 15 (-72.73%)
Mutual labels:  context
Material-Smart-Rating
😍⭐⭐Material Smart Rating App - An Android library that encourages users to rate the app on Google Play.⭐⭐😘
Stars: ✭ 30 (-45.45%)
Mutual labels:  context
retrygroup
Package retrygroup provides synchronization, Context cancelation for groups of retry goroutines working on subtasks of a common task.
Stars: ✭ 18 (-67.27%)
Mutual labels:  context
node-red-contrib-FIWARE official
FIWARE-Node-Red integration supporting NGSI-LD
Stars: ✭ 14 (-74.55%)
Mutual labels:  context
TradeBot
Crypto trading bot using Binance API (Java)
Stars: ✭ 292 (+430.91%)
Mutual labels:  signals
contextual
🌈 Generate your Ecto contexts using this macro and eliminate boilerplate
Stars: ✭ 18 (-67.27%)
Mutual labels:  context
go-csync
Golang: contex-aware synchronization primitives (mutex).
Stars: ✭ 27 (-50.91%)
Mutual labels:  context
python-graceful-shutdown
Example of a Python code that implements graceful shutdown while using asyncio, threading and multiprocessing
Stars: ✭ 109 (+98.18%)
Mutual labels:  graceful-shutdown
hiatus-spring-boot
No description or website provided.
Stars: ✭ 23 (-58.18%)
Mutual labels:  graceful-shutdown
react-combine-contexts
🚀Use multiple React Contexts without pain.
Stars: ✭ 23 (-58.18%)
Mutual labels:  context
multi-ctx
Multiple Spring Contexts Showcase
Stars: ✭ 16 (-70.91%)
Mutual labels:  context
react-generate-context
A helper function for reducing React Context boilerplate
Stars: ✭ 24 (-56.36%)
Mutual labels:  context
async armor
Graceful drop-in replacement for asyncio.shield
Stars: ✭ 15 (-72.73%)
Mutual labels:  graceful
sanic-plugin-toolkit
Easily create Plugins for Sanic!
Stars: ✭ 49 (-10.91%)
Mutual labels:  context

DEPRECATION WARNING

sigctx is now part of SentimensRG/ctx.

This repository will no longer receive updates.

sigctx

Go contexts for graceful shutdown

installation

go get -u github.com/SentimensRG/sigctx

usage

ctx := sigctx.New()  // returns a regular context.Context

// With this simple pattern, your goroutines are guaranteed to terminate correctly
ctx, cancel := context.WithCancel(ctx)
go someBlockingFunction(ctx)
defer cancel()

<-ctx.Done()  // will unblock on SIGINT and SIGTERM

RFC

If you find this useful, please let me know: [email protected]

License

The MIT License

Copyright (c) 2017 Sentimens Research Group, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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].