3 ms·
According to activity monitor, I have around 2200 threads running at the moment. Obviously most of those are idle but it still seems to me that we should be abl
by kristiandupont 7y ago
According to activity monitor, I have around 2200 threads running at the moment. Obviously most of those are idle but it still seems to me that we should be able to utilize multiple cores even without switching to whole new paradigms?
- PaulHoule 7y agoIt depends on the workload. If you can cut the work onto 1 millisecond chunks that barely interact you can scale fine in this paradigm. Threads are used both to schedule work across cores but also to manage waits on i/o, a server will have threads running when it is waiting for a client and a Windows or Linux or Mac has many servers running for local use. Threads are not efficient for I/O scheduling (async/await or select or similar apps are better, but harder to code for.). They are efficient enough for your laptop to have 2000 of them.