Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: rami17 Newsgroups: comp.programming.threads Subject: Object oriented Stackful coroutines library for Delphi and FreePascal was just updated.. Date: Sat, 22 Apr 2017 01:20:57 -0400 Organization: A noiseless patient Spider Lines: 62 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 22 Apr 2017 01:17:48 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="254ebea11a7516790752f6ff92c55629"; logging-data="29783"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+98z8FZlwVjmBBZLwEE5TD" 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:i+I8Ty0CpVKRgxAu2AWByAgvfX8= Xref: csiph.com comp.programming.threads:3736 Hello..... Object oriented Stackful coroutines library for Delphi and FreePascal was just updated.. I have just ported it to MacOSX, so now it works with both Windows and MacOSX in both 32bit and 64bit. I have just verified it and it works great. Description: This object oriented library to do Stackful Coroutines was ported to the 32 bit FreePascal and to 64 bit Delphi and FreePascal compilers and enhanced with a semaphore and a mutex by Amine Moulay Ramdane. Because threads alone are expensive on windows because each thread can take one Megabytes of stack and the thread context switch is expensive, so you can use this library with my Threadpool engine that scales well to be able to serve a great number of internet connections or TCP/IP socket connections, and of course you can do with it many other things such us simulations etc. Here is the use cases of this object oriented coroutines library: - Context switching is expensive with threads, with coroutines it is really fast. - Coroutines eliminate race conditions and that's really interesting on embedded systems and other applications. - My mutex and semaphore of my coroutines library are much much more faster than the mutex and semaphore used on processes and threads. Please note that the 64 bit FreeePascal unit is Stackful, but the 64 bit Delphi XE unit is Stackless. Use the threads.pas unit for 32 bit compilers, and use threads64.pas unit for 64 bit compilers. Main features: Very small RAM overhead and provides semaphore and mutex. Note: I have not saved the XMM registers on 64 bit compilers in my assembler routines, so with fastcall calling convention you have to pass the floating-point arguments by reference or use dynamic memory. Look at the defines.inc include file, you can configure it like this: {$DEFINE XE} for Delphi XE compilers. {$DEFINE FPC} for FreePascal. {$DEFINE Delphi} for Delphi 7 to Delphi 2007 compilers. Language: FPC Pascal v2.2.0+ / Delphi 5+: http://www.freepascal.org/ Operating Systems: Win, Mac OS X (x86). You can download it from: https://sites.google.com/site/aminer68/object-oriented-stackful-coroutines-library-for-delphi-and-freepascal Thank you, Amine Moulay Ramdane.