~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/userservice/__init__.py

  • Committer: wagrant
  • Date: 2008-08-14 07:23:00 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1019
dispatch: Unlock the session just before we launch the app. If we don't
          do that, a single long-running request can potentially lock
          all sessions.
userservice: Lock the session while writing to it. It will be unlocked
             normally, as above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
    if login == req.user.login:
380
380
        user = db.get_user(login)
381
381
        session = req.get_session()
 
382
        session.lock()
382
383
        session['user'] = user
383
384
        session.save()
 
385
        session.unlock()
384
386
 
385
387
    db.close()
386
388