Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Object oriented Stackful coroutines library for Delphi and FreePascal was just updated..

10 views
Skip to first unread message

rami17

unread,
Apr 21, 2017, 9:20:59 PM4/21/17
to
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.
0 new messages