AssertionError when threading in Python

后端 未结 2 1799
再見小時候
再見小時候 2020-12-15 16:11

I\'m trying to run some simple threading in Python using:

t1 = threading.Thread(analysis(\"samplequery\"))
t1.start()

other code runs in here

t1.join()
         


        
2条回答
  •  伪装坚强ぢ
    2020-12-15 16:46

    You need to provide the target attribute:

    t1 = threading.Thread(target = analysis, args = ('samplequery',))
    

提交回复
热议问题