v0.8.9June 30, 2020
v0.8.8December 25, 2019
v0.8.7November 25, 2019
v0.8.6October 19, 2019
- ⬆️ Upgraded parking_lot.
- ➕ Added a
HandleEventtrait used to listen for various events from the pool for monitoring purposes.
- 🔀 Switched from standard library synchronization primitives to
- ➕ Added a
- The set of idle connections is now treated as a stack rather than a queue. The old behavior interacted poorly with configurations that allowed the pool size to shrink when mostly idle.
- ⬆️ Upgraded from log 0.3 to 0.4.
- 🛠 Fixed the example in the README.
🔧 Pool configuration has changed. Rather than constructing a
Configand passing it to the
Poolconstructor, you now configure a
Builderwhich then directly constructs the pool:
// In 0.7.x let config = Config::builder() .min_idle(3) .build(); let pool = Pool::new(config, manager)?; // In 0.8.x let pool = Pool::builder() .min_idle(3) .build(manager)?;
Pool::newmethod can be used to construct a
Poolwith default settings:
// In 0.7.x let config = Config::default(); let pool = Pool::new(config, manager)?; // In 0.8.x let pool = Pool::new(manager)?;
initialization_fail_fastconfiguration option has been replaced with separate
Builder::build_uncheckedmethods. The second returns a
Pooldirectly without wrapping it in a
Result, and does not check that connections are being successfully opened:
// In 0.7.x let config = Config::builder() .initialization_fail_fast(false) .build(); let pool = Pool::new(config, manager).unwrap(); // In 0.8.x let pool = Pool::builder().build_unchecked(manager);
GetTimeouterror types have been merged into a unified
Pool::configmethod has been replaced with accessor methods on
Poolto directly access configuration, such as
scheduled_thread_poolcrate has been upgraded from 0.1 to 0.2.
- ⏱ The deprecated
Builder::num_threadsmethod has been removed. Construct a
ScheduledThreadPooland set it via