title: Python Threading- "Process finished with exit code -1073741819 (0xC0000005)"
body: <p>I am trying to implement threading in python 3.5 but is not working. While running the script, the process finishes with exit code -1073741819 (0xC0000005).</p>
  
  <p>Here is the code:</p>
  
  <pre><code>if __name__ == "__main__":
      # divide training and testing data
      index70 = pd.read_csv('F:/dataset/rain_data/index70.csv', header=None)
      index70 = np.array(index70.values[0])
      # print(len(index70))
      # print(index70.values[0][5])
  
      # read netcdf
      netcdf_entire_dataset = Dataset("F:/dataset/entire_dataset.nc", "r")
      rain_models = netcdf_entire_dataset.variables['rain_models']
  
      data_table_t1 = np.zeros((101, 10))
      data_table_t5 = np.zeros((101, 10))
      data_table_t10 = np.zeros((101, 10))
      data_table_t20 = np.zeros((101, 10))
      data_table_t40 = np.zeros((101, 10))
      data_table_t80 = np.zeros((101, 10))
  
      threading.Thread(target=calculation, args=(0,)).start()
      threading.Thread(target=calculation, args=(6,)).start()
      threading.Thread(target=calculation, args=(12,)).start()
      threading.Thread(target=calculation, args=(18,)).start()
  
      np.savetxt('threshold_'+str(1)+'.csv', data_table_t1, delimiter=',', fmt='%10.5f')
      np.savetxt('threshold_' + str(5) + '.csv', data_table_t5, delimiter=',', fmt='%10.5f')
      np.savetxt('threshold_' + str(10) + '.csv', data_table_t10, delimiter=',', fmt='%10.5f')
      np.savetxt('threshold_' + str(20) + '.csv', data_table_t20, delimiter=',', fmt='%10.5f')
      np.savetxt('threshold_' + str(40) + '.csv', data_table_t40, delimiter=',', fmt='%10.5f')
      np.savetxt('threshold_' + str(80) + '.csv', data_table_t80, delimiter=',', fmt='%10.5f')
  </code></pre>
  
  <p>Calculation method has multiple nested for loops. The thread works for small example but, doesn't work for this method.</p>
  
  <p>Output:
  Process finished with exit code -1073741819 (0xC0000005)</p>