Thread: Multithreading and PlugIns

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    21

    Multithreading and PlugIns

    Hi all

    In my new project i want to load PlugIns and run them in a seperate thread each. Now designing my PulgIn architecture i came up with the question where to put the ThreadCall function? Is it better to put it in the Core or in each PlugIn itself so when instanciated the plugin creates a thread and runs its functions?

    Thanks in advance

    Ghostcoder

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Presumably, you've also designed a communication mechanism that alllows the core to communicate with each plugin thread.

    If you want to force it to be a thread, then you should do it yourself in the core.

    But maybe there are certain simple plugins where a thread would be an excessive solution.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    21
    thank you for your advice.

    indeed i designed a stack system to let the core cummunicate with the plugin and the other way round.
    but back to the topic i think ill put some kind of white list into the core to decide if the plug in needs a thread or not.

Popular pages Recent additions subscribe to a feed