Dear Alexis Roda Sir Thank You very Much.
definitely Race Condition may arise if we do not put code inn critical section. But your suggested approach did not work and i found another alternative which is working fine. If we put this code with necessary care than will it be ok? On Tue, May 28, 2019 at 8:33 PM Alexis Roda < [email protected]> wrote: > No, it isn't. It's not thread safe. > > Changes in shared state in multi-threaded code may lead to race > conditions[1]. > > Depending on your usage it may be very unlikely, but under the right > circumstances root may end up having some missing fields in the form or dgp > may see fields that it is not intended to see. > > Either protect the critical section[2] with some kind of lock or, as I > suggested in my previous answer, create non-shared (request local) state. > > > [1] https://en.wikipedia.org/wiki/Race_condition > [2] https://en.wikipedia.org/wiki/Critical_section > > -- > You received this message because you are subscribed to the Google Groups > "Django users" 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 https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAMDYoXa16C5goSadFbSoXQg1-v2zh9vrq%2BAk%3Dkqbq1rk%3DsgSQw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAMDYoXa16C5goSadFbSoXQg1-v2zh9vrq%2BAk%3Dkqbq1rk%3DsgSQw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,* *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India* *Official: [email protected] <[email protected]> * * Mobile: +91-9270696267* -- You received this message because you are subscribed to the Google Groups "Django users" 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 https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAECSbOvKUK0H2mrt_S%2BhmbVmmeneQXXc%2BR9a%3DFGHE7XOVmOK-Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

