Re:Callbacks as our Generation's Goto Statement
by nickmeharry on Thursday August 15, 2013 @06:21PM
(#6220971)
Have you looked at the Erlang model? Each Erlang process (green thread) only gets the arguments initially passed in and whatever else it asks for from other running processes. The only shared state is long-running processes created for the purpose of explicitly sharing state.
Re:Callbacks as our Generation's Goto Statement
by fzzzy on Thursday August 15, 2013 @06:23PM
(#6220976)
Yep. The Actor model that Erlang uses is exactly what I was referring to being missing from green thread libraries for other languages (C#, python with greenlet or generators, js with generators)
Re:Callbacks as our Generation's Goto Statement
by makeset on Thursday August 15, 2013 @06:37PM
(#6221032)
PLEASE. There's nothing wrong with COMEFROM.
Re:Callbacks as our Generation's Goto Statement
by HCIdivision17 on Thursday August 15, 2013 @07:34PM
(#6221281)
ICL099I COMMENTOR IS OVERLY POLITE
There's nothing more frustrating than trying to debug why a callback isn't being called. Who calls it? How do I set a breakpoint somewhere to see why it isn't being called? etc.
The one thing that is still missing from await and other green thread approaches is cheap global contexts. Isolating every different green thread so they can't implicitly share state is the obvious next step.