FullStackAI
Published in

FullStackAI

Photo by chuttersnap on Unsplash

Concurrency in Python: Cooperative vs Preemptive Scheduling

Why is it that I can move the mouse pointer on my computer while watching a movie? Or open an email while on a video call? Even in the days when CPUs were single core, computers were seemingly able to manage all sorts of tasks at the same time. Yet every task — even just moving the mouse — requires some CPU time, and single core CPUs can only do one thing at a time.

Musings on AI, Engineering and more…

Recommended from Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jacob Unna

Jacob Unna

Software Engineer @ Deloitte Analytics & Cognitive

More from Medium

Example how gRPC request and response flows