It does not lock the whole application. It simply serializes all
requests sharing the same session.
If two different users (or same use using different sessions) connect
to the same app, they do not see any locking.
The locking is a feature to prevent race conditions on session
variables.

Massimo


On Jan 5, 8:03 am, vince <[email protected]> wrote:
> oh thanks for the info
>
> no session still lock the whole application
> session.forget()
>
> sql session works fine
> session.connect(request,response,db=db)
>
> i think it should make the session default to sql then if file session
> have locking issue.
>
> -vince
>
> On Jan 5, 9:04 pm, mdipierro <[email protected]> wrote:
>
> > Because by default you have files in sessions and files are locked to
> > guarantee transactional integrity. Replace
>
> > def hold():
> >  import time
> >  time.sleep(60)
> >  return "done"
>
> > with
>
> > def hold():
> >  session.forget()
> >  import time
> >  time.sleep(60)
> >  return "done"
>
> > and there will be no issue. sessions in db are also not locked (for
> > technical reasons).
>
> > Massimo
>
> > On Jan 5, 2:55 am, vince <[email protected]> wrote:
>
> > > let say i put the following in application/welcome/controllers/
> > > default.py
>
> > > def hold():
> > >  import time
> > >  time.sleep(60)
> > >  return "done"
>
> > > after i accesshttp://localhost:8000/welcome/default/hold
>
> > >http://localhost:8000/welcome/anythingwilllock until hold is
> > > returned
>
> > >http://localhost:8000/admin/oranyothers application works fine
>
> > > i even try with a new empty welcome applcation where the model/db.py
> > > is empty
>
> > > -vince
>
> > > On Jan 5, 9:02 am, mdipierro <[email protected]> wrote:
>
> > > > sorry, I do not understand the context of the question.
>
> > > > which operation locks the entire applications?
>
> > > > Massimo
>
> > > > On Jan 4, 5:18 pm, vince <[email protected]> wrote:
>
> > > > > i just notice single thread, not even with db access, will lock the
> > > > > whole application. i can only access to other application on the same
> > > > > server.
>
> > > > > is that suppose to be single thread only for each applcation?
>
> > > > > -vince
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to