Destroy Citizen.CreateThread()?


#1

Is it possible to destroy a thread and if it is then how?


#2

You mean destroy the ‘while true do’ loop or the actual thread?


#3

I assume (could be completely wrong) that the scheduler or w/e automatically deletes the thread if it is no longer being used (like not in a while true loop, but just execute some code and finish).

Anyone know if that’s correct?


#4

This is also my assumption, although if it is a ‘while true do’ loop you can use ‘break’ to break it


#5

I don’t think you can delete a thread but you can stop it from running like james said.

Can use break or return