Skip to content

Commit

Permalink
Document that you must always close the pool
Browse files Browse the repository at this point in the history
Fixes #170
  • Loading branch information
hadley committed Feb 14, 2024
1 parent 4671ae5 commit 723e354
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/pool-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
#' little computational cost. The pool should be created only once
#' and closed when it is no longer needed, to prevent leaks.
#'
#' Every usage of `poolCreate()` should always be paired with a call to
#' `poolClose()` to avoid "leaking" resources. In shiny app, you should
#' create the pool outside of the server function and close it on stop,
#' i.e. `onStop(function() pool::poolClose(pool))`.
#'
#' See [dbPool()] for an example of object pooling applied to DBI database
#' connections.
#'
Expand Down
5 changes: 5 additions & 0 deletions man/Pool-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 723e354

Please sign in to comment.