Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #2070 > unrolled thread

SemaCondvar and SemaMonitor...

Started byaminer <aminer@toto.net>
First post2014-01-28 16:37 -0800
Last post2014-01-28 16:40 -0800
Articles 2 — 1 participant

Back to article view | Back to comp.programming.threads


Contents

  SemaCondvar and SemaMonitor... aminer <aminer@toto.net> - 2014-01-28 16:37 -0800
    Re: SemaCondvar and SemaMonitor... aminer <aminer@toto.net> - 2014-01-28 16:40 -0800

#2070 — SemaCondvar and SemaMonitor...

Fromaminer <aminer@toto.net>
Date2014-01-28 16:37 -0800
SubjectSemaCondvar and SemaMonitor...
Message-ID<lc97sq$2cp$1@news.albasani.net>
Hello,

I have invented my SemaCondvar and my SemaMonitor, and
i have just upgraded my SemaMonitor, my new SemaMonitor
is a combination of a Semaphore and EventCount, and it
supports also the charracteristics of a windows manual
event object and a windows automatic event object and
it is FIFO fair and starvation-free. the windows event
object is FIFO fair nor starvatoin free.. and my SemaCondvar
is a combination of a Semaphore and a Condition variable.


Here is the new interface that i have implemented:

TSemaCondvar = class
    public

constructor
Create(m1:TCriticalSection;state1:boolean=false;InitialCount1:longword=0;MaximumCount1:longword=INFINITE);
      destructor Destroy; override;
      function  wait(mstime:longword=INFINITE):boolean;
      procedure signal();overload;
      procedure signal_all();
      procedure signal(nbr:integer);overload;
      function WaitersBlocked:integer;
    end;

TSemaMonitor = class
    public
      constructor
Create(state1:boolean=false;InitialCount1:longword=0;MaximumCount1:longword=INFINITE);
      destructor Destroy; override;
      function  wait(mstime:longword=INFINITE):boolean;
      procedure signal();overload;
      procedure signal_all();
      procedure signal(nbr:integer);overload;
      function WaitersBlocked:integer;
      procedure setSignal;
      procedure resetSignal;
    end;



You can download my new SemaCondvar and SemaMonitor from:

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



Thank you,
Amine Moulay Ramdane.

[toc] | [next] | [standalone]


#2071

Fromaminer <aminer@toto.net>
Date2014-01-28 16:40 -0800
Message-ID<lc982e$2cp$7@news.albasani.net>
In reply to#2070
On 1/28/2014 4:37 PM, aminer wrote:
> the windows event
> object is FIFO fair nor starvatoin free..

I mean the windows event object is not FIFO fair nor starvation free..


Thank you,
Amine Moulay Ramdane.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming.threads


csiph-web