All Projects → Code-Hex → sigctx

Code-Hex / sigctx

Licence: MIT License
context with signal in golang

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to sigctx

ctxutil
utils for Go context
Stars: ✭ 18 (-5.26%)
Mutual labels:  context, signal
promise-abortable
Promise lib for aborting in chain.
Stars: ✭ 19 (+0%)
Mutual labels:  signal, cancel
remote-lib
💫 Convert your JavaScript library to a remote service.
Stars: ✭ 40 (+110.53%)
Mutual labels:  context
react-wisteria
Managing the State with the Golden Path
Stars: ✭ 18 (-5.26%)
Mutual labels:  context
go-grpc-bidirectional-streaming-example
gRPC bidirectional streaming example written in golang
Stars: ✭ 83 (+336.84%)
Mutual labels:  context
database
Simple and easy go database micro framework
Stars: ✭ 12 (-36.84%)
Mutual labels:  context
timber-ruby
🌲 Great Ruby logging made easy.
Stars: ✭ 155 (+715.79%)
Mutual labels:  context
no-redux
⚛️ 🎣 Experimenting with using hooks and context instead of Redux
Stars: ✭ 79 (+315.79%)
Mutual labels:  context
golib
Open version of common golang libraries useful to many projects.
Stars: ✭ 47 (+147.37%)
Mutual labels:  signal
react-multi-context
Manage multiple React 16 contexts with a single component.
Stars: ✭ 19 (+0%)
Mutual labels:  context
binance-pump-alerts
Tracks prices of pairs on binance and notifies when price movements based on pre-defined parameters are met.
Stars: ✭ 65 (+242.11%)
Mutual labels:  signal
context
Tiny, type-safe, JavaScript-native `context` implementation
Stars: ✭ 18 (-5.26%)
Mutual labels:  context
purescript-wire
Events and Signals for FRP. Monad instances included
Stars: ✭ 13 (-31.58%)
Mutual labels:  signal
mini-create-react-context
(A smaller) polyfill for the react context API
Stars: ✭ 34 (+78.95%)
Mutual labels:  context
RacJS
implementation of RAC(OC) on JavaScript and replacement of RxJS
Stars: ✭ 13 (-31.58%)
Mutual labels:  signal
react-text-translator
An experimental way to translate text inside React components with context
Stars: ✭ 15 (-21.05%)
Mutual labels:  context
eval-estree-expression
Safely evaluate JavaScript (estree) expressions, sync and async.
Stars: ✭ 22 (+15.79%)
Mutual labels:  context
SignatureVerificationDemo
Android 使用jni校验应用签名sha1值,防止so文件逆向盗用
Stars: ✭ 111 (+484.21%)
Mutual labels:  context
react-patterns
react patterns examples
Stars: ✭ 39 (+105.26%)
Mutual labels:  context
newrelic-context
Contains different helpers to make life easier with NewRelic and Context.
Stars: ✭ 21 (+10.53%)
Mutual labels:  context

sigctx

Signal for context.Context.

GoDoc Build Status Coverage Status Go Report Card

Description

The package sigctx were developed to easily bind signals and context.Context.

We use a combination of signals and context.Context often. It is mainly processing to context cancel after receiving the signal. Using this package makes it easy to do it.
Example: signal_cancel.go

By the way, if you are using the context, have you ever wanted to send the signal to all the goroutines? You are lucky 🎉 With this package, it is possible to do something close to that.
Example: notify_signal.go

Do you want to run the above two methods at the same time? Of course you can do it.
However, it becomes complicated if you mistake order. (Perhaps this problem may be fixed in the future.) But it will be very simple if the order of invocation is correct!!
I recommend comparing mistake_ctx_order.go and correct_ctx_order.go.

Install

go get github.com/Code-Hex/sigctx

Contributing

Welcome!!
I'm waiting for pull requests or reporting issues.

License

MIT

Author

CodeHex

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