SemaCondvar module version 1.0 is here...

A

aminer

Hello,

SemaCondvar module version 1.0 is here...


SemaCondvar and SemaMonitor are new and portable synchronization objects...


Author: Amine Moulay Ramdane.

Description: SemaCondvar and SemaCondvar are a new synchronization
objects that combines a semaphore and a condition variable, it only uses
an event object and a critical section , so it's fast.

If you don't want the signal to be lost if the threads are not
waiting, just pass True to the state argument of to the constructor,
if you pass False to the state argument of the construtor so the signals
will be lost if the threads are not waiting.

Please take a look a the test.pas Object Pascal demo inside the zipfile,
compile and run it...


The implemented methods are:

function wait(mstime:longword=INFINITE):boolean;
procedure signal();overload;
procedure signal_all();
procedure signal(nbr:integer);overload;
function WaitersBlocked:integer;


Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Windows, Mac OSX , Linux , Unix...


Required FPC switches: -O3 -Sd -dFPC -dFreePascal

-Sd for delphi mode....


You can download SemaCondvar from:

http://pages.videotron.com/aminer/


Thank you,
Amine Moulay Ramdane.
 
A

aminer

...

Hello,

Sorry for my english...

Here is again the description:

Description: SemaCondvar and SemaMonitor are new and portable
synchronization objects that combine the characteristics of a semaphore
and a condition variable, they only use an event object and a critical
section ,
so they are fast.


You can download SemaCondvar from:

http://pages.videotron.com/aminer/


Thank you,
Amine Moulay Ramdane.
 
K

Keith Thompson

aminer said:
SemaCondvar module version 1.0 is here... [...]
Please take a look a the test.pas Object Pascal demo inside the zipfile,
compile and run it...
[...]

Why would an Object Pascal module be of interest on comp.lang.c?
 
Z

zebra9forC

Keith said:
aminer said:
SemaCondvar module version 1.0 is here... [...]
Please take a look a the test.pas Object Pascal demo inside the
zipfile, compile and run it...
[...]

Why would an Object Pascal module be of interest on comp.lang.c?

Because it represents an era where there was a departure from 1960s-style
programming. What was just a promise back then, can be had today, but not
with C. The point is that a lot of people use C to "hedge bets". That is,
they choose the wrong tool in the short term thinking that someday it will
pay off, but usually doesn't. While C is good in certain fields in the hands
of those who can harness it, today, one must ask why if those C coders are
so good, they don't just create the *perfect* tool for the job on the fly.
 
Ö

Öö Tiib

Because it represents an era where there was a departure from 1960s-style
programming.

Some things are changed but not much ... LISP (1958) is still alive and
kicking. Programming language is a tool. When tool is new then there are
lot of people who misuse it. Usage style gets better over time with
experience. Pascal was way more popular 20 years ago than now so it
apparently does something that does not fit with that modern style.
What was just a promise back then, can be had today, but not
with C. The point is that a lot of people use C to "hedge bets". That is,
they choose the wrong tool in the short term thinking that someday it
will pay off, but usually doesn't.

What promise? 3-th level languages? Prolog? It did not happen. We still have
2 levels of programming languages: A) that instruct computers (assembler)
B) that describe run-time behavior (all the rest). C is just bit ahead of
the pack thanks to large libraries, good performance and availability of
good specialists.
While C is good in certain fields in the hands of those who can harness
it, today, one must ask why if those C coders are so good, they don't
just create the *perfect* tool for the job on the fly.

Strange question. Most perfect tool for throwing a throw-away program
together on the fly that I know is Python interpreter. Couple of C coders
lead by Guido van Rossum did write it in C. For me it looks really well
written C. I am bad judge being mostly C++ fan, but yeah if there will
be even more perfect tool then chances are that it will be again written
in C.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,955
Messages
2,570,117
Members
46,705
Latest member
v_darius

Latest Threads

Top