Load Dll multiple times to allow multi threading in .Net

前端 未结 3 618
悲哀的现实
悲哀的现实 2020-12-20 21:36

My .Net program uses a fortran Dll to perform a maths function (Arpack, solves eigen modes). I believe the fortran contains static varibles and generally isn\'t thread safe

3条回答
  •  温柔的废话
    2020-12-20 22:03

    As you figuered out, you cannot load the library multiple times. I guess you have two possibilities:

    • Use multiple AppDomains: more informations
    • Use multiple processes to do the task: more informations

    In both solutions you need to consider a method of data exchange betwen the processes/app domains. Anyway, it won't be a simple task!

提交回复
热议问题