William Banfield
fdc246e4a8
libs/clist: revert clear and detach changes while debugging ( #6731 )
3 years ago
JayT106
d66d1ada5b
libs/CList: automatically detach the prev/next elements in Remove function ( #6626 )
closes #2207
Also added `Clear()` function if we want to clear whole elements in CList.
3 years ago
Marko
719e028e00
libs: internalize some packages ( #6366 )
## Description
Internalize some libs. This reduces the amount ot public API tendermint is supporting. The moved libraries are mainly ones that are used within Tendermint-core.
4 years ago
Sam Kleinman
0811c7be99
fix: theoretical leak in clisit.Init ( #6302 )
4 years ago
Marko
2ac5a559b4
libs: wrap mutexes for build flag with godeadlock ( #5126 )
## Description
This PR wraps the stdlib sync.(RW)Mutex & godeadlock.(RW)Mutex. This enables using go-deadlock via a build flag instead of using sed to replace sync with godeadlock in all files
Closes : #3242
4 years ago
Dev Ojha
69c7aa77bc
clist: speedup Next by removing defers ( #2511 )
This change doubles the speed of the mempool's reaping.
Before:
BenchmarkReap-8 5000 365390 ns/op 122887 B/op
After:
BenchmarkReap-8 10000 158274 ns/op 122882 B/op
6 years ago
Ismail Khoffi
1de32fba17
Check for int overflow in clist ( #2289 )
* explicitly panic if max capacity is reached
* address review comments
* comments and a test
6 years ago
Dev Ojha
89668c3179
clist: Speedup functions ( #2208 )
* clist: Speedup detachNext() and detachPrev()
We used unnecessary function calls, defers, and extra mutexes.
These are not our friends for writing fast code in our libs.
* Remove more defers from clist functions
* Add more benchmarks
6 years ago
Zach Ramsay
44dad6d70b
Revert "detele everything"
This reverts commit d02c5d1e30
.
6 years ago
Zach Ramsay
d02c5d1e30
detele everything
6 years ago
Ethan Buchman
ae3bf81833
mv tmlibs files to libs dir
6 years ago
Thomas Corbière
ee67e34519
Fix lint errors ( #190 )
* use increment and decrement operators.
* remove unnecessary else branches.
* fix receiver names.
* remove omittable code.
* fix dot imports.
7 years ago
Anton Kaliaev
91b41ddd59
add waitCh as an alternative to waitGroup
new methods:
- [CList] WaitChan()
- [CElement] NextWaitChan()
- [CElement] PrevWaitChan()
Refs https://github.com/tendermint/tendermint/pull/1173
7 years ago
Jae Kwon
e47ce81422
Comment fixes from Emmanuel
7 years ago
Jae Kwon
0f8ebd024d
Update clist.go
Add more justification of synchrony primitives in documentation.
7 years ago
Jae Kwon
2fd8f35b74
Fix #112 by using RWMutex per element
7 years ago
Ethan Buchman
acbd7caaf8
merge go-clist
8 years ago
Jae Kwon
dbd04eadeb
Remove CList, moved to go-clist
9 years ago
Jae Kwon
d939cd964b
First commit of CList
9 years ago
Jae Kwon
80c7e26bee
Fix memory-leak in CList; Patched with DetachPrev/DetachHead
9 years ago
Jae Kwon
76189fde0d
Add Remove() implementation, CList is doubly-linked
9 years ago
Jae Kwon
c65e9e7d91
Added CList
9 years ago