.net - When using .Net asynchronous sockets, which thread are callbacks called from?
问题描述
When you use asynchronous methods like Socket.BeginConnect
and Socket.BeginReceive
you pass an AsyncCallback
delegate.
When these delegates are called, are they called from one of the internal thread-pool threads, or a temporary thread? I was thinking for instance in the case you are running a server, if you start doing logic in your callback implementation and don't return, will you exhaust the threadpool after a few connections are accepted since you are 'stealing' the thread?
解决方案
推荐阅读
- perl - 如何尊重对数组中标量的引用
- python - Scrapy:start_requests 中的 CloseSpider 不起作用
- mongodb - 如何使用 unwind Mongo Aggregate
- google-chrome-extension - 如何在 Chrome 扩展程序中为用户输入创建对话框
- spring - 如何将 Userdao 中的地址变量映射到 UserDto 中的地址变量
- android - Xamarin 表单:导航栏在 android 上隐藏部分列表视图
- android - 你能帮忙删除android中的文件未找到异常错误吗?
- rapidminer - 如何在rapidmienr studio中将性能算子输出插入数据库?
- list - 如何根据元素将列表拆分为多个列表?
- javascript - 如何在路由前使用auth的中间件获取token