Skip to content

Commit

Permalink
Increase PoolInfo::DEFAULT_RESOURCE_CAPACITY
Browse files Browse the repository at this point in the history
  • Loading branch information
attackgoat committed Feb 9, 2024
1 parent 9fed1c5 commit 1b96f7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Changed

- Expanded the number of functions and scopes profiled by the `profiling` crate
- Increase `PoolInfo::DEFAULT_RESOURCE_CAPACITY` from 4 to 16 in order to prevent excess resource
creation

## [0.9.4] - 2024-02-07

Expand Down
4 changes: 2 additions & 2 deletions src/pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl<T> Drop for Lease<T> {
if let Some(cache) = self.cache_ref.upgrade() {
let mut cache = cache.lock();

if cache.len() >= cache.capacity() {
if cache.len() == cache.capacity() {
cache.pop_front();
}

Expand Down Expand Up @@ -237,7 +237,7 @@ pub struct PoolInfo {

impl PoolInfo {
/// The maximum size of a single bucket of resource instances.
pub const DEFAULT_RESOURCE_CAPACITY: usize = 4;
pub const DEFAULT_RESOURCE_CAPACITY: usize = 16;

/// Constructs a new `PoolInfo` with the given acceleration structure, buffer and image resource
/// capacity for any single bucket.
Expand Down

0 comments on commit 1b96f7a

Please sign in to comment.