On Fri, Oct 16, 2009 at 3:09 PM, Stephan Wehner <stephanweh...@gmail.com> wrote:
> On Fri, Oct 16, 2009 at 12:58 PM, Simon Slavin
> <slav...@hearsay.demon.co.uk> wrote:
>>
>> On 16 Oct 2009, at 8:53pm, P Kishor wrote:
>>
>>> If neither the username nor the email exist in the db, then the
>>> application creates a record and informs the user of success. Except,
>>> the previous ajax request (I am assuming it is the previous ajax
>>> request from onblur event from the email field) has locked the
>>> database, and the app returns an error that "the database is locked."
>>>
>>> So, what suggestion might you all have for getting around this?
>>
>> You're using AJAX ?  That means JavaScript.  Put a 3 second pause into
>> the routine that returns the query about the email field.  3 seconds
>> should be enough to get the database unlocked.
>
> What if two users sign up at the same time? Javascript surely wouldn't help.
>


Right. Which is why I am hoping for some sure-shot way of avoiding
such a race condition.





-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, WI, United States
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to