Skip to content

mmcshane/nls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8d50726 · Oct 15, 2021

History

3 Commits
Jun 14, 2019
Oct 15, 2021
Jun 14, 2019
Jun 14, 2019
Jun 14, 2019
Jun 14, 2019
Jun 14, 2019

Repository files navigation

NLS is Non-lexical Scopes for Go

GoDoc

Go has defer which gives something approaching strict lexical lifetimes for resource management but there is no direct support for object or resource lifetimes that may outlive the function in which they are created. This small library allows the user to create a tree of scope instances, each of which owns the lifetime of zero or more resource-consuming objects (e.g. goroutines, sockets, gRPC clients, etc) and which can be used to cleanly release said resources.