Skip to content

Commit

Permalink
Merge pull request bottlepy#222 from iurisilvio/master
Browse files Browse the repository at this point in the history
Changing thread-save to thread-safe.
  • Loading branch information
defnull committed Sep 19, 2011
2 parents 424a10f + 00e6337 commit 56dbafd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2770,13 +2770,13 @@ def wrapper(*args, **kwargs):
%end
"""

#: A thread-save instance of :class:`Request` representing the `current` request.
#: A thread-safe instance of :class:`Request` representing the `current` request.
request = Request()

#: A thread-save instance of :class:`Response` used to build the HTTP response.
#: A thread-safe instance of :class:`Response` used to build the HTTP response.
response = Response()

#: A thread-save namepsace. Not used by Bottle.
#: A thread-safe namespace. Not used by Bottle.
local = threading.local()

# Initialize app stack (create first empty Bottle app)
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ The effects and APIs of plugins are manifold and depend on the specific plugin.
completely. '''
return template('contact')

Other plugin may populate the thread-save :data:`local` object, change details of the :data:`request` object, filter the data returned by the callback or bypass the callback completely. An "auth" plugin for example could check for a valid session and return a login page instead of calling the original callback. What happens exactly depends on the plugin.
Other plugin may populate the thread-safe :data:`local` object, change details of the :data:`request` object, filter the data returned by the callback or bypass the callback completely. An "auth" plugin for example could check for a valid session and return a login page instead of calling the original callback. What happens exactly depends on the plugin.


Application-wide Installation
Expand Down

0 comments on commit 56dbafd

Please sign in to comment.