mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 10:16:14 -06:00
[chore]: Bump github.com/uptrace/bun/extra/bunotel from 1.2.9 to 1.2.10
Bumps [github.com/uptrace/bun/extra/bunotel](https://github.com/uptrace/bun) from 1.2.9 to 1.2.10. - [Release notes](https://github.com/uptrace/bun/releases) - [Changelog](https://github.com/uptrace/bun/blob/master/CHANGELOG.md) - [Commits](https://github.com/uptrace/bun/compare/v1.2.9...v1.2.10) --- updated-dependencies: - dependency-name: github.com/uptrace/bun/extra/bunotel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
8488ac9286
commit
78e03263ea
31 changed files with 417 additions and 204 deletions
47
vendor/github.com/puzpuzpuz/xsync/v3/map.go
generated
vendored
47
vendor/github.com/puzpuzpuz/xsync/v3/map.go
generated
vendored
|
|
@ -294,11 +294,32 @@ func (m *Map) LoadAndStore(key string, value interface{}) (actual interface{}, l
|
|||
)
|
||||
}
|
||||
|
||||
// LoadOrCompute returns the existing value for the key if present.
|
||||
// Otherwise, it computes the value using the provided function, and
|
||||
// then stores and returns the computed value. The loaded result is
|
||||
// true if the value was loaded, false if computed.
|
||||
//
|
||||
// This call locks a hash table bucket while the compute function
|
||||
// is executed. It means that modifications on other entries in
|
||||
// the bucket will be blocked until the valueFn executes. Consider
|
||||
// this when the function includes long-running operations.
|
||||
func (m *Map) LoadOrCompute(key string, valueFn func() interface{}) (actual interface{}, loaded bool) {
|
||||
return m.doCompute(
|
||||
key,
|
||||
func(interface{}, bool) (interface{}, bool) {
|
||||
return valueFn(), false
|
||||
},
|
||||
true,
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
// LoadOrTryCompute returns the existing value for the key if present.
|
||||
// Otherwise, it tries to compute the value using the provided function
|
||||
// and, if success, returns the computed value. The loaded result is true
|
||||
// if the value was loaded, false if stored. If the compute attempt was
|
||||
// cancelled, a nil will be returned.
|
||||
// and, if successful, stores and returns the computed value. The loaded
|
||||
// result is true if the value was loaded, or false if computed (whether
|
||||
// successfully or not). If the compute attempt was cancelled (due to an
|
||||
// error, for example), a nil value will be returned.
|
||||
//
|
||||
// This call locks a hash table bucket while the compute function
|
||||
// is executed. It means that modifications on other entries in
|
||||
|
|
@ -322,26 +343,6 @@ func (m *Map) LoadOrTryCompute(
|
|||
)
|
||||
}
|
||||
|
||||
// LoadOrCompute returns the existing value for the key if present.
|
||||
// Otherwise, it computes the value using the provided function and
|
||||
// returns the computed value. The loaded result is true if the value
|
||||
// was loaded, false if stored.
|
||||
//
|
||||
// This call locks a hash table bucket while the compute function
|
||||
// is executed. It means that modifications on other entries in
|
||||
// the bucket will be blocked until the valueFn executes. Consider
|
||||
// this when the function includes long-running operations.
|
||||
func (m *Map) LoadOrCompute(key string, valueFn func() interface{}) (actual interface{}, loaded bool) {
|
||||
return m.doCompute(
|
||||
key,
|
||||
func(interface{}, bool) (interface{}, bool) {
|
||||
return valueFn(), false
|
||||
},
|
||||
true,
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
// Compute either sets the computed new value for the key or deletes
|
||||
// the value for the key. When the delete result of the valueFn function
|
||||
// is set to true, the value will be deleted, if it exists. When delete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue