+1 vote

So, I have a thread which runs youtube-dl and uses it to search for a song and download it.

So, I have this problem where if the user types a query, I need to kill the existing thread and then start the new one.

This the code I use to run my thread function.

search_thread = Thread.new()
var search_err = search_thread.start(self, "print_search", [$UISearch/LineEdit.text])
print_search($UISearch/LineEdit.text)

Now I some how need to know if one instance of search_thread(search_err?) is running and if it is kill it and start a new one.

asked May 16 in Engine by Bugdot (43 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.