- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I create andinstall aDLL which contains routines that are called by a third party application which is multithreaded, must my DLL be linked with the single- or multithreaded dll libraries?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd say the latter which comesat negligible cost over single. Even if your DLL is single your project is now multithreaded by courtesy of the 3rd party threaded library.
Gerry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the Fortran library can be called from multiple threads, it is critical that you choose the multithread library. It is not that the library itself makes your application threaded, but by choosing the multithread library it is thread safe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MADsblionel:
It is not that the library itself makes your application threaded, but by choosing the multithread library it is thread safe.
Neither of these assertions is correct. If all one had to do was link to multithreaded libraries to attain thread safety then there would be no need to use vTune, Thread Checker, Thread Profiler, Threading Blocks, etc. If you link a single threaded clientto a multithreaded library you havea multithreaded app that isn't necessarily thread safe.
Gerry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, that wasn't quite what I meant. I meant that the Fortran runtime library was thread safe so that you could do I/O from a multithreaded application. If you don't use a multithreaded library from a threaded application you could have I/O errors.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page