Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1366168 Posts in 64016 Topics- by 55900 Members - Latest Member: Ships66

September 17, 2019, 09:49:05 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Coroutine Cost
Pages: [1]
Print
Author Topic: Coroutine Cost  (Read 84 times)
Sundrop
Level 1
*

Grandma cooks best!


View Profile WWW
« on: September 09, 2019, 05:53:28 PM »

Silly question:

Code:
IEnumerator Task ()
{
    yield return AnotherTask ();
}

IEnumerator AnotherTask()
{
    while (enabled)
    {
        // do something

        yield return null;
    }
}

Will this code cost 2 coroutines worth of RAM or 1? Seems silly to ask but I wanna make sure since I'm doing this a lot.  Embarrassed
« Last Edit: September 09, 2019, 08:52:48 PM by Sundrop » Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic