коммит произвёл
GitHub
родитель
a3cf490a4d
Коммит
03a55367d9
3
vendor/github.com/hashicorp/go-immutable-radix/.travis.yml
сгенерированный
поставляемый
3
vendor/github.com/hashicorp/go-immutable-radix/.travis.yml
сгенерированный
поставляемый
@@ -1,3 +0,0 @@
|
||||
language: go
|
||||
go:
|
||||
- tip
|
||||
2
vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md
сгенерированный
поставляемый
2
vendor/github.com/hashicorp/go-immutable-radix/CHANGELOG.md
сгенерированный
поставляемый
@@ -1,4 +1,4 @@
|
||||
# 1.1.0 (May 22nd, 2019)
|
||||
# UNRELEASED
|
||||
|
||||
FEATURES
|
||||
|
||||
|
||||
2
vendor/github.com/hashicorp/go-immutable-radix/README.md
сгенерированный
поставляемый
2
vendor/github.com/hashicorp/go-immutable-radix/README.md
сгенерированный
поставляемый
@@ -1,4 +1,4 @@
|
||||
go-immutable-radix [](https://travis-ci.org/hashicorp/go-immutable-radix)
|
||||
go-immutable-radix [](https://circleci.com/gh/hashicorp/go-immutable-radix/tree/master)
|
||||
=========
|
||||
|
||||
Provides the `iradix` package that implements an immutable [radix tree](http://en.wikipedia.org/wiki/Radix_tree).
|
||||
|
||||
14
vendor/github.com/hashicorp/go-immutable-radix/iradix.go
сгенерированный
поставляемый
14
vendor/github.com/hashicorp/go-immutable-radix/iradix.go
сгенерированный
поставляемый
@@ -86,6 +86,20 @@ func (t *Tree) Txn() *Txn {
|
||||
return txn
|
||||
}
|
||||
|
||||
// Clone makes an independent copy of the transaction. The new transaction
|
||||
// does not track any nodes and has TrackMutate turned off. The cloned transaction will contain any uncommitted writes in the original transaction but further mutations to either will be independent and result in different radix trees on Commit. A cloned transaction may be passed to another goroutine and mutated there independently however each transaction may only be mutated in a single thread.
|
||||
func (t *Txn) Clone() *Txn {
|
||||
// reset the writable node cache to avoid leaking future writes into the clone
|
||||
t.writable = nil
|
||||
|
||||
txn := &Txn{
|
||||
root: t.root,
|
||||
snap: t.snap,
|
||||
size: t.size,
|
||||
}
|
||||
return txn
|
||||
}
|
||||
|
||||
// TrackMutate can be used to toggle if mutations are tracked. If this is enabled
|
||||
// then notifications will be issued for affected internal nodes and leaves when
|
||||
// the transaction is committed.
|
||||
|
||||
Ссылка в новой задаче
Block a user