lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>> local B = coroutine.clone(A)  -- hypothetical
> The common term for this is call/cc or
> call-with-current-continuation:
> https://en.wikipedia.org/wiki/Call-with-current-continuation

Not quite, I think.  A continuation - at least as I know them - can be
called multiple times, resuming from the same point each time.  As I
understand it, the coroutine.clone proposed in the quote above leads to
something similar, but calling it resumes the coroutine - the original
and the clone can be called only once each before they proceed,
mutating their state-of-computation.

I suspect this is the multi-shot/one-shot difference you talk about.
(I can't read the paper you link to; the link you gave,
http://www.inf.puc-rio.br/~roberto/docs/MCC15-04.pdf, doesn't work for
me.  The TCP connection comes up, and it ACKs the request, but even
after waiting ten minutes I have zero octets of response traffic.
Oddly, it doesn't answer pings, and mtr to it gets to 139.82.59.22,
which has forged rDNS, before failing.  Maybe the machine is sick?)

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse@rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B