Confused about Multithreading/Multi Cores

I have been wondering how to use the multithreading features that this page (Unity - Manual: Scripting) talked about. The link doesn’t seem to talk about multi threading much at all, so I wonder how to use the multi threading features.

(P.S. I think that the yield statement doesn’t use 2+ cores when available, however I am not sure. Please correct me if I am wrong.)

There is no multithreading that you can use. Unity is not thread safe so if you use dotnets Threading to offload stuff that code can NOT call unity functions unless you want to risk the whole application to crash

So basically you can use the .Net threads but you cannot call any Unity functions? :frowning:

P.S. Do you think they will make it thread safe in 3.0

P.S.S. What was that linked page referring to?

Coroutines
You just needed to click one more link :slight_smile:
“The yield statement”

http://unity3d.com/support/documentation/ScriptReference/index.Coroutines_26_Yield.html

The next page discusses coroutines for C#

I thought coroutines did not take advantage of multiple physical cores/hyper threading. Please correct me if I am wrong.

That has nothing to do with multiple threads. All Unity code is single-threaded only.

–Eric

He asked what the link was referring to.
It was about coroutines.
Its a bit misleading because it actually reads:
“Cooperative Multi-Threading”

The link from that paragraph goes here:
http://unity3d.com/support/documentation/ScriptReference/index.Coroutines_26_Yield.html