Hacker News new | ask | show | jobs
by skydhash 1 day ago
> For other things, async task (or green thread, whatevs) per connection is a very nice model that you can't do with thread per connection

I don’t think I ever seem this patterns, What I’ve seen is either a thread pool for tasks (what essentially async is), or dedicated threads for each parts of the processing (a thread for the UI, and a thread for some background services like playing music).

1 comments

> I don’t think I ever seem this patterns, What I’ve seen is either a thread pool for tasks (what essentially async is)

this doesn't really contradict with

> async task (or green thread, whatevs) per connection

The async tasks will probably run on a thread pool (e.g. in tokio).