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


Groups > comp.programming.threads > #2070

SemaCondvar and SemaMonitor...

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject SemaCondvar and SemaMonitor...
Date 2014-01-28 16:37 -0800
Organization albasani.net
Message-ID <lc97sq$2cp$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


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.

Back to comp.programming.threads | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

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

csiph-web