×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

[Q]how to isolate unmanaged/non thread safe code in .Net?

If we deal with non thread safe managed code at concurrent environment, we can create
AppDomain that loads the non thread safe assembly and call the code. CLR isolates
code between AppDomain(s). This means CLR will keep seperate instances of the code
for each AppDomain. (If you have 10 AppDomain using the code, CLR will load 10 instance
of the code).

However, I have unmanaged/non thread safe dll. I need to konw how to use it inside
.Net code with concurrent enviornment. I can not find any article dealing with this situation.

Any advice is appreciated.
Report