Talk:Coroutine (API)

From ComputerCraft Wiki
Jump to: navigation, search

Bottom section (Interaction with other APIs) is written upside-down. It would be more useful to start out talking about how the event-based model ComputerCraft uses actually utilizes coroutines and the .yield and .resume parameters and return values. That is the primary use case for coroutines in ComputerCraft, so it would be better to lead with that, as it will cause less confusion among new users. From there, it would be good to mention that if one does desire to deviate from the event-based model ComputerCraft uses, that one should avoid using (or add special handling for) all of the functions which wait for events. "Blocking" is also a misleading term, since it implies that the execution point gets stuck in that function (which would block other coroutines from running), when the truth of the matter is that it simply yields execution. "Yielding" would be a better term. Lyqyd 15:53, 28 May 2013 (MSK)

Better? Hawk777 17:41, 28 May 2013 (MSK)
Much better, thanks! Lyqyd 18:04, 28 May 2013 (MSK)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox