Can python threads access variables in the namespace?

后端 未结 3 1029
没有蜡笔的小新
没有蜡笔的小新 2021-01-31 05:36

I have a script that creates a bunch of threads, runs a program to use the threads to run tasks from a queue, and returns something from each thread. I want to count how many of

3条回答
  •  误落风尘
    2021-01-31 06:01

    Based on Python variable scope error,

    I should have put "global successful" under "def foo():".

    Oops.

提交回复
热议问题