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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 08 Jan 2017 08:59 AM |
| lua is single threaded, coroutines will always run asynchronus |
|
|
| Report Abuse |
|
|