I can't return an Array from a Thread

Godot Version

Godot 3.5.3

Question

I can’t return an Array from a Thread.

MyThread.start(self,"_ResLoadThread",RES_Textures)
RES_Textures = MyThread.wait_to_finish()

RES_Textures - This is an array with a list of paths to textures that need to be loaded.

func _ResLoadThread(data:Array)->Array:
	print(data)
	var data_next = []
	for i in data:
		var dict = {}
		var image = Image.load_from_file(i["path"])
		dict["path"]=i["path"]
		var imgTex = ImageTexture.new()
		var texture = imgTex.create_from_image(image)
		dict["tex"]=texture
		data_next.push_back(dict)
	print(data_next)
	return data_next
	pass

but why wait_to_finish() returns Null instead of an array with a list
print(data) returns the correct array unlike print(data_next)

Check the return value of .start() to see if the thread was actually created.

Return 0 / OK

I solved the problem