Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Parallelism in a DLL

Borje_Emilsson
Beginner
460 Views
I have a DLL that is called by a multi-threaded main program. This program may create several instances of the DLL
Somewhere I read that the DLL itself, at least in DLLMain, should not call another DLL or create new threads, e g through parallelization of do-loops. What are the recommendations of the Forum on this issue ? Are there any risks for locks or racing conditions ? If so, how to mitigate ?
Best regards / Emilsson
0 Kudos
1 Solution
Steven_L_Intel1
Employee
460 Views

I don't think it's possible to have "several instances of the DLL". As long as the DLL is written to be thread-safe, it should be fine. There's really little difference between calling a DLL and calling object code. You do want to make sure that the EXE and DLL are using the same run-time libraries.

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
461 Views

I don't think it's possible to have "several instances of the DLL". As long as the DLL is written to be thread-safe, it should be fine. There's really little difference between calling a DLL and calling object code. You do want to make sure that the EXE and DLL are using the same run-time libraries.
0 Kudos
Reply