@bebetter said in How to Manage API Key Usage in Multi-Threaded Tasks with BAS:
Can we return the API key back to the resource after finishing a thread?
You don't need it. Just set the usage count of the resource when you create it.
I've made an example of the script.
At some point when the script is running the software crashes.
Where do you think is the problem , am i doing something wrong or this is a bug ?0_1519559805722_Call Threads Ex.xml
@bogdan I guess, you still have a chance to take a look at my example script.
What you can observe when your script is running is usually a symptom of something taking all CPU so that the main BAS processing loop is unable to take control for a single tick of time.
I can assume that the reason is seed and worker threads respawning. My script had special guards implemented for this. You've totally neglected that part.
So back to the drawing board !
@seedgg Я постараюсь сделать минимальный тестовый скрипт в ближайшее время. Немного посвободнее станет, и возьмусь. Пока скажу, что у меня успешно работают несколько проектов с многими многопоточными функциями, одни из которых подкидывают работу другим.