The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,343 other followers

Threads are not the answer | CompuTruthing

Posted by jpluimers on 2019/07/17

Long read, but worth it: [WayBack] Threads are not the answer | CompuTruthing

We argue that the thread-oriented approach to concurrency is a bad approach. It has severe modifiability problems, but also performance problems. We should not think in terms of low level primitives.

It has great analogies between threading and cars on roads:

Software world Automotive world
thread road
work unit set of cars that pass over a road in a period of time
work unit dependencies cars need to go from one road to another
total execution time total time for all cars to reach the destination
lock/semaphore traffic lights / roundabout
too few work unit dependencies (highway) road network badly connected (sometimes this means long way to nearby locations)
too many work unit dependencies too many intersections or access points (too much time spent in these)
too many small threads (descheduled often) small roads
threads that are not descheduled from cores highways


[WayBack] Kevlin Henney – Google+ 

Related videos under the fold (more at DevTube – Videos by @kevlinhenney)




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: