Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request.POST.copy() 非安全線程? #90

Open
talent881 opened this issue Sep 24, 2019 · 0 comments
Open

request.POST.copy() 非安全線程? #90

talent881 opened this issue Sep 24, 2019 · 0 comments

Comments

@talent881
Copy link

talent881 commented Sep 24, 2019

views.py

    @expose('/to_save')
    def to_save(self):
        POST01 = request.POST.copy()
        self._to_save_sub()

    def _to_save_sub(self):
        POST02 = request.POST.copy()

程式碼是以上這樣。
以每秒 POST 10 筆不同數據的方式做測試, 在同一線程(Thread-1) POST01 得到的數據和 POST02 得到的數據有機會是不同的數據。

這會有什麼解決方法?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant