generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: how do coroutines work internally?

Previous Thread :: Next Thread 
cabbler is not online. cabbler
Joined: 19 Jun 2015
Total Posts: 735
08 Jan 2017 03:07 AM
I have heard they do not actually run at the same time. They certainly seem like they do. How do they achieve this?

I imagine they might fluidly alternate their line execution but that sounds taxing!

Perhaps everything runs so fast it just runs each script until there is a delay then jumps to a different script and repeat.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
08 Jan 2017 05:25 AM
There is no point in speculation. They are well documented and the source is available. Remove all the spaces in the links below.

lua . org / manual / 5 . 1 / manual . html # 2 . 11

lua . org / pil / 9 . html
Report Abuse
cabbler is not online. cabbler
Joined: 19 Jun 2015
Total Posts: 735
08 Jan 2017 07:32 AM
Thanks, the answer is not super clear but it looks like my second idea was correct?
Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
08 Jan 2017 07:34 AM
Just remember, too many coroutines RUNNING AT THE SAME TIME can lag your game.

http://wiki.roblox.com/index.php?title=Beginners_Guide_to_Coroutines
http://wiki.roblox.com/index.php?title=Global_namespace/Coroutine_manipulation
http://wiki.roblox.com/index.php?title=User:NecroBumpist/Tutorials/Coroutines
http://wiki.roblox.com/index.php?title=User:SoulStealer9875/Tutorials/Coroutines


http://wiki.roblox.com
Report Abuse
Customality is not online. Customality
Joined: 11 Aug 2015
Total Posts: 590
08 Jan 2017 08:59 AM
lua is single threaded, coroutines will always run asynchronus
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image