<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class="">Ok,</div><div class=""><br class=""></div><div class="">But I think goroutines are not really threads (are faster and cheaper enought to make a diference) and channels are more like filedescriptors than signals, you stream data throught these.</div><div class=""><br class=""></div><div class="">Thanks for your answer!</div><div class=""><br class=""></div><div class="">Daniel<br class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;" class=""><font size="3" class=""><br class=""></font></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;" class="">Daniel Valls Estella · tel. 659.910.830 ·&nbsp;<a href="mailto:daniel@upzzle.com" class="">daniel@upzzle.com</a></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">El 22 des 2015, a les 11:50, Susan Cheng &lt;<a href="mailto:susan.doggie@gmail.com" class="">susan.doggie@gmail.com</a>&gt; va escriure:</div><br class="Apple-interchange-newline"><div class="">It's a&nbsp;little difference with goroutine. Go using threads and signal.<div class="">My implementation is following C# methods that MS staff tells me.<br class=""><br class="">Daniel Valls Estella &lt;<a href="mailto:daniel@upzzle.com" class="">daniel@upzzle.com</a>&gt; 於 2015年12月22日星期二 寫道:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">I think it’s better to take as a reference the <b class="">Go</b> language and his <b class="">goroutines</b> and <b class="">channels</b>.<div class=""><br class=""></div><div class="">Not just to face these type of problems but also to take new architectural aproches to build software solutions.<br class=""><div class=""><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><font size="3" class=""><br class=""></font></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><font size="3" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;" class="">refs:</font></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><font style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px;" class="">&nbsp;</font></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><a href="https://tour.golang.org/concurrency/1" target="_blank" class="">https://tour.golang.org/concurrency/1</a></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><a href="https://tour.golang.org/concurrency/2" target="_blank" class="">https://tour.golang.org/concurrency/2</a></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><a href="https://tour.golang.org/concurrency/5" target="_blank" class="">https://tour.golang.org/concurrency/5</a></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><a href="https://youtu.be/f6kdp27TYZs" target="_blank" class="">https://youtu.be/f6kdp27TYZs</a></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><br class=""></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><br class=""></div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class="">What you think?</div><div style="line-height:normal;text-align:-webkit-auto;text-indent:0px" class=""><br class=""></div><div style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Daniel</div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class=""><font size="3" class=""><br class=""></font></div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Daniel Valls Estella · tel. 659.910.830 ·&nbsp;<a href="javascript:_e(%7B%7D,'cvml','daniel@upzzle.com');" target="_blank" class="">daniel@upzzle.com</a></div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">El 22 des 2015, a les 8:33, Andrew Bennett via swift-evolution &lt;<a href="javascript:_e(%7B%7D,'cvml','swift-evolution@swift.org');" target="_blank" class="">swift-evolution@swift.org</a>&gt; va escriure:</div><br class=""><div class=""><div dir="ltr" class=""><div class="">Great proposal! I'm all for this, I think your proposed implementation is pretty good too.</div><div class=""><br class=""></div><div class="">It would be interesting to expand the proposal to consider more cases in more detail:</div><div class="">&nbsp;* Concurrency</div><div class="">&nbsp;* SequenceType versus GeneratorType<br class=""></div><div class="">&nbsp;* Should a language feature depend on the Standard Library (GeneratorType)? Alternatives:<br class=""></div><div class="">&nbsp; &nbsp; &nbsp;+ func myFunction -&gt; () -&gt; T?</div><div class="">&nbsp; &nbsp; &nbsp;+ func myFunction -&gt; () -&gt; (myFunction_State,&nbsp;myFunction_State&nbsp;-&gt; T?)</div><div class="">&nbsp;* What happens if you write: guard ... else { yield ... }</div><div class="">&nbsp;* Use an enum for the state that encapsulates all possible variables in each state</div><div class=""><br class=""></div><div class="">If you're not familiar with it, there's another thread that discussed similar here:</div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001872.html" target="_blank" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001872.html</a><div class=""><br class=""></div><div class="">In particular you may be interested in Chris Lattner's comment:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px" class="">I’m very interested in this, but it is clearly out of scope for Swift 3. It should also be considered alongside whatever async/concurrency approach we tackle (likely in swift 4).</blockquote><br class="">Either way it's worth discussing and working towards :)<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Dec 22, 2015 at 6:03 PM, Félix Cloutier <span dir="ltr" class="">&lt;<a href="javascript:_e(%7B%7D,'cvml','swift-evolution@swift.org');" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">There's probably some additional work to do on the proposal document, but I would like to see coroutines in Swift too. The feature has been very successful in other languages like Python and C#, and unless I'm mistaken, work is being done to standardize it in C++.</div><div class=""><br class=""></div><div class="">Generators are one use case, but resumable functions in general can also be used to make async code look prettier.</div><br class=""><div class="">
<span style="border-collapse:separate;line-height:normal;border-spacing:0px" class="">Félix</span>
</div>

<br class=""><div class=""><blockquote type="cite" class=""><span class=""><div class="">Le 22 déc. 2015 à 01:47:05, Susan Cheng via swift-evolution &lt;<a href="javascript:_e(%7B%7D,'cvml','swift-evolution@swift.org');" target="_blank" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class=""></span><div class=""><span class=""><div dir="ltr" class=""><div class="">here is my proposal for swift lang</div><div class=""><br class=""></div><a href="https://github.com/SusanDoggie/swift-evolution/blob/master/proposals/0018-coroutine-for-swift.md" target="_blank" class="">https://github.com/SusanDoggie/swift-evolution/blob/master/proposals/0018-coroutine-for-swift.md</a><br class=""></div>
</span><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=iRI3beHTe3UxYAHTlV3lA38zIPfHMhyuRzgTmGKV6k7cXv8i0D9519DoK7KYHAZzDNERxafB1pe872Yhhmi-2BiyWxsAHedNi3wh4t89fT-2BKwnNGjs9DnBFwV5eBmT6fDCjciSJZI8IeZaYr0UgGPnYQEVopgJV1xozCPgVx1QMsXTqwKj8GReKDgqgfrW75KolAqOxHlNELRYO4sMeFmSxsguQIkEf4l8dL3CnbhvjmU-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important" class="">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="javascript:_e(%7B%7D,'cvml','swift-evolution@swift.org');" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=pQw7h83fWt3LLbgkfL4TSUL0weaZnVFZxDe5GShw4uRNKnTGhJeGxonM5msZE9opXco5hFz-2FepMTWpqOJKwxo-2Fe2VIVN6mVOrF-2BaySWURX-2BPZVsXp943zQJP31RiLgQHnpSgAtVY9mOb2RSUc-2FH4BhtUrKfWxse4Yvsyqr2k8wpDc9XBkOOssTr9lEtGPAkjmAzuM5b-2BPWpODXHOcg7J8BK9kuIMAJmyZbwiu-2BC5qAQ-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important" class="">
</div>
<br class="">_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="javascript:_e(%7B%7D,'cvml','swift-evolution@swift.org');" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=AdkfTiApI80cNEyortTzHW0kAjxqiRekfpEJArOEyyqmj4DRJx3ooJIHhV9lkZZFHQGuvpvgJ07djNDDr2cbO55ipOSLSgPiqKL6f2al0u374ShmXDyxxYjmu15DYu5LcQMApCVA087QaLw2hnsJZhbDN-2Fy7dLsjtWNZtEUOGpNGAv14a87mB3JmoluyGczE1totvhAJl6rgjxcY-2FGfKZZLIq6GDCiqz267BKWGvDbg-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important" class="">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="javascript:_e(%7B%7D,'cvml','swift-evolution@swift.org');" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></body></html>