Log in to reply

ASI Mod: Is scriptRegisterAdditionalThread() in ScriptHookV actually creating a fake thread like fiber in RPH?

  • I hope you are having a great start to the week :D

    So in the main.cpp file when coding the asi mod, we use the scriptRegisterAdditionalThread() function to add one more thread to the mod.

    My question is: is it actually creating a fake thread? Because you will have to call WAIT(0) in one thread to let other threads run concurrently. Otherwise, if it is creating a real thread like std::thread library, we may have to use the mutex lock when iterating through the same vector from different threads to avoid the game crashing.

    It would be really nice of you to share your experience on this kind of threading issues :beers:


    Yes, as far as I know everything runs in the same thread and you don't have to protect access to your resources.

  • @ikt Thank you for your timely answer :smile: I have seen your previous posts and they have helped me a lot!

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.