I have been searching for info about whether this is a good implementation or if I should go for a threadpool. The asker's chosen answer to the above question seems to say that using AsyncCallback to handle requests is a very good approach
Indeed Yes, Async-Await
makes sense in this case, as its designed for the IO based calls, remote calls, where except dispatching the request to a remote host nothing much is expected from the caller, so a thread pool thread would be a sheer waste as it waits for the call to return, while holding on to important resources. In fact Async-Await
would help in making the system far more scalable, since calls are queued on hardware (device driver) based IO completion ports.
But I am wondering if that is true for any operating system or if it only applies to Windows?
As you are trying to use it on Mono (Linux)
, if the functionality is exposed, then it is bound to work the same way as expected in Windows
, though the compatibility details here say Yes. Adding my perspective, as mentioned above, since this is a purely a hardware based functionality being harnessed, which is implemented on same lines as Windows
in case of Linux
and other Operating systems
too, therefore its quite certain that it is able to work on same perspective, though the internal implementation, API calls and optimization would certainly differ, but for the end user the experience of using it will not change