DLL usage

Posted on 2011-10-17
Last Modified: 2013-11-26
I'm creating a program that needs to do a lot of calculations using variable from a grid.
All calculations are in DLL with the program passing different parameters to get a result.

The question. Is it possible to create 100 threads and pass different parameters to the same DLL and get the correct answer from all 100 threads?

Question by:CalKid
    LVL 17

    Expert Comment


    Author Comment

    So all 100 threads can be running at the same time?

    Is there anything special I need to know to accomplish this?
    LVL 74

    Accepted Solution

    So all 100 threads can be running at the same time?
    Not physically at the same time (you only have so many processors), but as you would perceive it, yes, they would be at the same time.

    Is there anything special I need to know to accomplish this?
    You need to pay attention to any shared resources which may be in use by multiple threads at any given time. Having some object that is shared by multiple threads, and which multiple threads depend on that object's state is a path to dirty data. Having two threads dependent on two resources, where each thread holds one resource, is a path to deadlock. Threading is a tricky subject, and you probably won't learn everything you need to know from this post alone.
    LVL 17

    Assisted Solution

    to my mind, nothing special. You can as well  run them in parallel such that they all execute at the same time. Of-course,if you want any code suggestion, you'll have to show some of the code in your DLL

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
    Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now