Fr0sT.Brutal 900 Posted November 18, 2019 With all the respect to professor and so on, marking threads the absolute evil rather looks like being unable to use them right. There's no other means of doing several things at one time. All the async sugar is implemented via threads under-the-hood. Processes? Highly similar to threads. Some languages strive to hide this mechanism from a programmer, just like Go and JS. But they use threads internally anyway. I suspect pr. Lee doesn't suggest any acceptable alternative? Share this post Link to post
Dalija Prasnikar 1396 Posted November 18, 2019 On 11/15/2019 at 7:00 PM, Joseph MItzen said: Quote If the next generation of programmers makes more intensive use of multithreading, then the next generation of computers will become nearly unusable. -Edward A. Lee, "The Problem With Threads" All I can say to Professor Lee is good luck with creating any non trivial mobile application without using threads that will not be killed by the OS for not responding or performing network operations on main thread. Theory is one thing practice another. 2 Share this post Link to post
Lars Fosdal 1792 Posted November 18, 2019 Our servers rarely run with less than 25 concurrent threads. We also have threads that can't run in parallel and a scheduler in place that ensures that it doesn't happen. Have we had problems? Sure, when we broke the rules. Threads are not more dangerous or hard to use than any other field of development you are introduced to. The hardest thing about multithreading is to adapt your thinking to asynchronous events, instead of sequences. 1 Share this post Link to post
John Kouraklis 94 Posted November 18, 2019 Professor Lee is an amazing academic simply because he proves the difference between academia and practice. We need both sides though. Out of curiosity, does the comment in SQLite site implies that they do not use threads internally in the database? Share this post Link to post
Fr0sT.Brutal 900 Posted November 18, 2019 I wonder what SQLite guys suggest to use instead of threads. Maybe they'll say "Use DB queries in the very main thread, and if you have queries lasting longer than 200 ms, do not use DB"? 😄 Share this post Link to post
aehimself 396 Posted November 18, 2019 35 minutes ago, John Kouraklis said: Out of curiosity, does the comment in SQLite site implies that they do not use threads internally in the database? The existence of sqlite3_interrupt suggests that yes indeed, they do 🙂 Share this post Link to post