Hi!
I'm trying to make my calls thread safe by using Locals but I don't get it 
giving the stress tests and the number of errors I have because a clear not 
safe access to the variables

My case is a little not regular so to speak

Let me try to describe it

I have a very minimal wgsi server and then I call to my class a recursive 
one where I consume the path in segments and then process the content

I've created 2 global objects: a Local and a LocalManager as points out the 
doc

Then my wsgi server creates my recursive object in the __init__ method and 
calls the recursive object's calls on the __call__ method of the server 
pasing the local object

In the local I pass to my object I've putted the request and the response 
before call my object's __call__

In the local passed I'm putting my per-call stuff like the segments of the 
path and so one. I've supossed that by asigning all my perthread variables 
in this object is what it make safe-thread but it clearly not

I know that because with ab with 10 concurrent request and 1000 gets 
sometimes the segments aren't consume in order and some calls finish with 
errors because the are trying to acces already consumed paths

The tipical not safe thread problem, isn't it?

How can I use local correctly?
Is it a problem of recursion?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.

Reply via email to