When I need use actors, task.desynchronize, and when - task.synchronize?

Hello guys. I’m making mining game. It’s single script generates really many chunks, which lag a lot while generating. I think usage of actor and de-synchronization can help me to speed up process. But IDK when I need desynchronize code, and when syncronize it back.

When I tried to look in documentation, I only understood that desynchronization will somehow make some codes run at the same time.

Can anyone please tell me, HOW I need use this actors, and when?

Have you read this explanation of what you’re able to do in synchronized vs desynchronized code blocks?

Specifically the “Desynchronizing Threads” and “Thread Safety” sections seem the most relevant to you.

I suggest looking up an explanation on YouTube as it’s always more simple than the documentation