Go to file
Anton Kaliaev 52ce4c20f8
Fix RepeatTimer memory leak (#137)
fix RepeatTimer memory leak (Refs #137)

* test case

* drain channels on reset

Leaking memory:
```
leaktest.go:144: leaktest: leaked goroutine: goroutine 116 [chan send]:
        github.com/tendermint/tmlibs/common.(*RepeatTimer).fireRoutine(0xc42006a410, 0xc4203403c0, 0xc42031b2c0)
                /go/src/github.com/tendermint/tmlibs/common/repeat_timer.go:160 +0x6e
        created by github.com/tendermint/tmlibs/common.(*RepeatTimer).reset
                /go/src/github.com/tendermint/tmlibs/common/repeat_timer.go:196 +0xe9
```

The alternative solution could be draining channels on the client side.

* add one more select instead of draining

thanks to Jae
2018-02-09 13:31:32 +04:00
autofile fix metalinter errors 2017-10-30 13:01:18 -05:00
cli cli: WriteDemoConfig -> WriteConfigVals 2018-02-02 23:05:28 -05:00
clist add waitCh as an alternative to waitGroup 2018-02-05 11:36:36 +04:00
common Fix RepeatTimer memory leak (#137) 2018-02-09 13:31:32 +04:00
db DbBackend -> DBBackend 2018-02-02 22:31:17 -05:00
events change service#Start to return just error (Refs #45) 2017-11-06 12:18:04 -05:00
flowrate linting: add to Makefile & do some fixes 2017-09-22 11:42:29 -04:00
log Merge pull request #77 from tendermint/18-unsupported-value-type 2017-11-07 21:29:54 -05:00
merkle merkle: remove go-wire dep by copying EncodeByteSlice 2018-02-03 01:29:39 -05:00
pubsub return error if client already subscribed 2017-12-09 23:35:14 -06:00
test go-common -> tmlibs 2017-04-18 17:56:05 -04:00
version changelog and version 2017-12-29 11:01:37 -05:00
.editorconfig add .editorconfig 2017-11-11 11:25:30 -05:00
.gitignore CacheDB (#67) 2017-11-09 17:42:32 -05:00
CHANGELOG.md add waitCh as an alternative to waitGroup 2018-02-05 11:36:36 +04:00
CODEOWNERS add codeowners file [ci skip] 2017-10-11 12:48:05 +04:00
LICENSE update license and changelog 2017-12-06 02:05:57 -05:00
Makefile Fix logical time (#122) 2018-02-02 12:51:30 +04:00
README.md logger is deprecated, removed; closes #115 2017-12-29 16:25:15 +00:00
circle.yml circle 2018-01-02 10:53:56 -05:00
glide.lock Fix RepeatTimer memory leak (#137) 2018-02-09 13:31:32 +04:00
glide.yaml Fix RepeatTimer memory leak (#137) 2018-02-09 13:31:32 +04:00
merge.sh go-common -> tmlibs 2017-04-18 17:56:05 -04:00
test.sh drop metalinter 2017-12-29 10:42:02 -05:00

README.md

TMLIBS

This repo is a home for various small packages.

autofile

Autofile is file access with automatic log rotation. A group of files is maintained and rotation happens when the leading file gets too big. Provides a reader for reading from the file group.

cli

CLI wraps the cobra and viper packages and handles some common elements of building a CLI like flags and env vars for the home directory and the logger.

clist

Clist provides a linekd list that is safe for concurrent access by many readers.

common

Common provides a hodgepodge of useful functions.

db

DB provides a database interface and a number of implementions, including ones using an in-memory map, the filesystem directory structure, an implemention of LevelDB in Go, and the official LevelDB in C.

events

Events is a synchronous PubSub package.

flowrate

Flowrate is a fork of https://github.com/mxk/go-flowrate that added a SetREMA method.

log

Log is a log package structured around key-value pairs that allows logging level to be set differently for different keys.

merkle

Merkle provides a simple static merkle tree and corresponding proofs.

process

Process is a simple utility for spawning OS processes.

pubsub

PubSub is an asynchronous PubSub package.