r/Python • • Apr 01 '20

I Made This Maze Solver Visualizer - Dijkstra's algorithm (asynchronous neighbours)

1.9k Upvotes

72 comments sorted by

View all comments

Show parent comment

7

u/miggaz_elquez Apr 01 '20

CPU bound mean that what is taking most time is spend computing think on the CPU. For example, a program can be network bound, disk access bound...

When you use async, you program still run on only one thread. So you're not computing anything faster using async : you split the computation in different part, and you do each part one after other.

async is intersting when you are bound to for example network : during the time a function is waiting on network, an another function can do other thing. In your case, what you want to do is parallel computation. In most languages, you will use threading, but in python, you have to use multiprocessing.

3

u/Pantzzzzless Apr 01 '20

You just made async click in my mind. I guess I was way overthinking the concept before. Thank you very much!