The use of PawnPlus plugin
# support-forum
n
If I have a function that may take more than 100ms to execute once, and there are 500 obj's that will keep going through this function while the server is running, how can I make it work without affecting the rest of my code and let the function calculate in other threads? can I do this? or is there another way?
Copy code
c
#define PP_SYNTAX_THREADED
#include <PawnPlus>

public OnObjectMoved(objectid)
{
    CallLocalFunction(#HugeCalculation, "d", objectid);
    return 1;
}

forward HugeCalculation(objectid);
public HugeCalculation(objectid)
{
    threaded(sync_interrupt)
    {
        //...
    }
    return 1;
}