在非 windows 平台上使用单声道时 AsyncCallback 好吗?

Is AsyncCallback good when using mono on non-windows platforms?

我正在编写一个网络服务器,无论 OS 它是否处于 运行 状态,我都希望它能正常工作。我一直在使用与 Does C# AsyncCallback creates a new thread?

相同的实现风格

我一直在搜索有关这是否是一个好的实现或者我是否应该使用线程池的信息。提问者对上述问题的选择答案似乎是说使用 AsyncCallback 来处理请求是一种非常好的方法,我应该使用它而不是使用线程池。

但我想知道这是否适用于任何操作系统,还是仅适用于 Windows?

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

确实是的,Async-Await 在这种情况下是有意义的,因为它是为基于 IO 的调用、远程调用而设计的,除了将请求分派到远程主机之外,调用者没有太多期望,所以线程池线程将是一种纯粹的浪费,因为它等待对 return 的调用,同时保留重要资源。事实上 Async-Await 将有助于使系统更具可扩展性,因为调用在基于硬件(设备驱动程序)的 IO 完成端口上排队。

But I am wondering if that is true for any operating system or if it only applies to Windows?

当您尝试在 Mono (Linux) 上使用它时,如果公开了该功能,那么它必然会以与 Windows 中预期相同的方式工作,尽管兼容性细节 [=19] =] 说 。如上所述,添加我的观点,因为这纯粹是一个基于硬件的功能被利用,在 Linux 和其他 Operating systems 的情况下,它与 Windows 在相同的行上实现,因此可以肯定的是,它能够以相同的视角工作,尽管内部实现、API 调用和优化肯定会有所不同,但对于最终用户而言,使用它的体验不会改变