1 post • Page 1 of 1
Hi everyone, I'm programming a script for a while now and I just had the idea to use multithreads to enhance its performance, something that I haven't thought of before. However, while attempting to implement it, my code just won't compile. I actually based myself on the well working multithread exemple of the ExampleAIModule from BWAPI 2.6.1, who analyzes the map while the game is going on. However, in my case, I need the thread to have access to functions and variables of the ExampleAIModule class. I have tried to declare the prototype of the thread inside the ExampleAIModule class but I get some static access error while attempting to use funcions of the class in the thread. I have read documentation about multithreading on the web for two days now, but I couldn't find a solution for this specific problem. Would anyone have a very simple example on how to implement such a successful multithreading? By the way I noted that there was no multithread topic yet in the forum so I believe that it could help more people too!
Who is online
Users browsing this forum: No registered users and 2 guests