Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: rami17 Newsgroups: comp.programming.threads Subject: Coroutines or threads ? Date: Tue, 25 Apr 2017 17:03:55 -0400 Organization: A noiseless patient Spider Lines: 38 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 25 Apr 2017 21:00:45 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="011b475201876a7ce453e202c3a295f9"; logging-data="2648"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Lsyr3IYodycElY2Q/Hr50" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Mozilla-News-Host: news://news.eternal-september.org:119 Cancel-Lock: sha1:srzWIbs+hEnT3k27SR1XdmoNA7c= Xref: csiph.com comp.programming.threads:3741 Hello, I have come to an interesting subject... Is my Object coroutines library still useful ? Can threads do the same job as coroutines ? I think that coroutines are still useful because a lock or a cache-line transfer is expensive on threads running on multicores, a cache-line transfer is around 400 CPU cycles on x86 , and that's too much expensive compared to coroutines, and the semaphore and mutex of my coroutines library and the contention on them are thus much much less expensive, other than that coroutines can yield to other functions or procedures inside a function or procedure, so i think that coroutines are thus still useful. My Object oriented Stackful coroutines library was updated.. Now i have rendered it completly stackful for both 32 bit and 64 bit Delphi and FreePascal. And it's portable to both Windows and MacOSX. And I think it is portable to Linux, just compile it on Delphi Tokyo for Linux. You can download my new version from: https://sites.google.com/site/aminer68/object-oriented-stackful-coroutines-library-for-delphi-and-freepascal Thank you, Amine Moulay Ramdane.