Skip to content

Commit 3a9e667

Browse files
Correct documentation for creating a session pool.
1 parent 753cf72 commit 3a9e667

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

doc/src/module.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,21 @@ Module Interface
132132
This method is an extension to the DB API definition.
133133

134134

135-
.. function:: SessionPool(user, password, database, min, max, increment, [connectiontype, threaded, getmode=cx_Oracle.SPOOL_ATTRVAL_NOWAIT, homogeneous=True, externalauth=True, encoding=None, nencoding=None])
135+
.. function:: SessionPool(user, password, database, min, max, increment, [connectiontype=cx_Oracle.Connection, threaded=False, getmode=cx_Oracle.SPOOL_ATTRVAL_NOWAIT, homogeneous=True, externalauth=False, encoding=None, nencoding=None])
136136

137137
Create and return a :ref:`session pool object <sesspool>`. This
138138
allows for very fast connections to the database and is of primary use in a
139139
server where the same connection is being made multiple times in rapid
140-
succession (a web server, for example). If the connection type is specified,
141-
all calls to acquire() will create connection objects of that type, rather
142-
than the base type defined at the module level. The threaded attribute is
143-
expected to be a boolean expression which indicates whether Oracle should
144-
wrap accesses to connections with a mutex. Doing so in single threaded
145-
applications imposes a performance penalty of about 10-15% which is why the
146-
default is False.
140+
succession (a web server, for example).
141+
142+
If the connection type is specified, all calls to acquire() will create
143+
connection objects of that type, rather than the base type defined at the
144+
module level.
145+
146+
The threaded attribute is expected to be a boolean expression which
147+
indicates whether Oracle should wrap accesses to connections with a mutex.
148+
Doing so in single threaded applications imposes a performance penalty of
149+
about 10-15% which is why the default is False.
147150

148151
The encoding argument is expected to be a string if specified and sets the
149152
encoding to use for regular database strings.

0 commit comments

Comments
 (0)