0

The latest version of Python, 3.5, implements the async and await keywords for asynchronous coroutines. I am beginning to get my head around them, and I understand that there is a distinction between concurrency and parallelism. Nonetheless, they are related and very often you can do concurrent tasks in parallel.

Hence, I am wondering: is there any way to use the new async and await features to do actual parallelism?

Community
  • 1
  • 1
Andrew Jaffe
  • 26,554
  • 4
  • 50
  • 59

1 Answers1

3

Currently in python, parallel processing needs to be done using the multiprocessing module, forking your process into multiple ones. This is because python has THE GIL, a 'feature' that prevents any one python interpreter from having multiple threads running in parallel. The new async / await are going to help people make asynchronous (concurrent) programs easier, but I don't think that they're going to help us with actual parallel computing.

Lily Mara
  • 3,859
  • 4
  • 29
  • 48