refactor to use mediator pattern with EventBus
This commit is contained in:
parent
a4136c937f
commit
0cf64a4bc9
15 changed files with 212 additions and 225 deletions
|
@ -26,12 +26,14 @@ var exit_thread:bool = false
|
|||
|
||||
|
||||
func _exit_tree():
|
||||
if !thread:
|
||||
return
|
||||
mutex.lock()
|
||||
exit_thread = true
|
||||
mutex.unlock()
|
||||
|
||||
semaphore.post()
|
||||
thread.wait_to_finish()
|
||||
thread.wait_to_finish()
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue