On Mar 4, 2008, at Mar 4:12:32 AM, Tzury Bar Yochay wrote:
>
>> did you post this code?
> at http://tzury.jottit.com/sqlite-threadsafe-writer I put a different
> version (no tcp daemon but a thread)
>
thanks, and this is pretty straightforward, but that leads me to the
next question. I don't fully understand how webpy works, in detail.
Specifically, is there a way to launch a thread that is shared
amongst all of the launched webpy threads? So, in your code, all
instances of webpy that get launched whenever a url is accessed need
to be able to write to the same database thread.
> With SQLite 3, If you try to write from to sqlite while another one is
> writing you get an error. I did not experienced any corruption.
In a low traffic site, can one do something like:
success=False:
while not success:
try:
db.write('something')
success=True
except: # needs the specific error here
time.time.sleep(0.1)
or is this really stupid?
bb
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---