~whereswaldon/dynselect

Golang select over dynamic pool of channels
dynselect: rename file
dynselect: initial implementation

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~whereswaldon/dynselect
read/write
git@git.sr.ht:~whereswaldon/dynselect

You can also use your local clone with git send-email.

#dynselect

This package implements a highly-situational, reflection-based select statement. It allows you to construct a runtime-modifiable pool of channels that are monitored for close with a select. This is useful primarily when monitoring a pool of contexts for cancellation if you need to perform some additional cleanup after detecting the context cancellation. See the tests for some example usages.

If you don't understand why this is useful, stay away. You definitely don't need it, and it may yet prove to be a bad idea in practice.

Dual UNLICENSE/MIT