title: reading large file uses 100% memory and my whole pc frozes
body: <p>I have made a simple app that encrypts and decrypts files. but when i load a large file like a 2gb, my program uses 100% of the memory. I use multiprocessing and multi threading.</p>
  <pre><code>poolSize = min(cpu_count(), len(fileList))
  process_pool = Pool(poolSize)
  thread_pool = ThreadPool(len(fileList))
  
  lock = Lock()
  worker = partial(encfile, process_pool, lock)
  
  thread_pool.map(worker, fileList)
  </code></pre>
  <pre><code>def encfile(process_pool, lock, file):
      with open(file, 'rb') as original_file:
          original = original_file.read()
  
      encrypted = process_pool.apply(encryptfn, args=(key, original,))
  
      with open (file, 'wb') as encrypted_file:
          encrypted_file.write(encrypted)
  </code></pre>