@@ -507,16 +507,21 @@ Populating the Pool with a Connection (Internal Implementation)
507
507
508
508
"Populating" the pool involves preemptively creating and establishing a
509
509
`Connection <#connection >`_ which is marked as "available" for use in future
510
- operations. This process is used to help ensure the number of established
511
- connections managed by the pool is at least minPoolSize.
510
+ operations.
512
511
513
512
Populating the pool MUST NOT block any application threads. For example, it
514
513
could be performed on a background thread or via the use of non-blocking/async
515
514
I/O. Populating the pool MUST NOT be performed unless the pool is "ready".
516
515
517
- If an error is encountered while populating a connection, it MUST be handled
518
- via the SDAM machinery according to the `Application Errors `_ section in the
519
- SDAM specification.
516
+ If an error is encountered while populating a connection, it MUST be handled via
517
+ the SDAM machinery according to the `Application Errors `_ section in the SDAM
518
+ specification.
519
+
520
+ If minPoolSize is set, the `Connection <#connection >`_ Pool MUST be populated
521
+ until it has at least minPoolSize total `Connections <#connection >`_. This MUST
522
+ occur only while the pool is "ready". If the pool implements a background
523
+ thread, it can be used for this. If the pool does not implement a background
524
+ thread, the checkOut method is responsible for ensuring this requirement is met.
520
525
521
526
.. code ::
522
527
@@ -567,12 +572,10 @@ If the pool is "closed" or "paused", any attempt to check out a `Connection
567
572
being "paused" MUST be considered a retryable error and MUST NOT be an error
568
573
that marks the SDAM state unknown.
569
574
570
- If minPoolSize is set, the `Connection <#connection >`_ Pool MUST have at least
571
- minPoolSize total `Connections <#connection >`_ while it is "ready". If the pool does
572
- not implement a background thread, the checkOut method is responsible for
573
- `populating the pool
574
- <#populating-the-pool-with-a-connection-internal-implementation> `_ with enough
575
- `Connections <#connection >`_ such that this requirement is met.
575
+ If the pool does not implement a background thread, the checkOut method is
576
+ responsible for ensuring that the pool is `populated
577
+ <#populating-the-pool-with-a-connection-internal-implementation> `_ with at least minPoolSize
578
+ `Connections <#connection >`_.
576
579
577
580
A `Connection <#connection >`_ MUST NOT be checked out until it is
578
581
established. In addition, the Pool MUST NOT prevent other threads from checking
0 commit comments