On Fri, 24 Aug 2007, Vinzent Hoefler wrote:

> On Friday 24 August 2007 07:55, Michael Van Canneyt wrote:
> > On Fri, 24 Aug 2007, Vinzent Hoefler wrote:
> > > On Thursday 23 August 2007 19:47, Jonas Maebe wrote:
> > > > On 23 Aug 2007, at 21:29, Luca Olivetti wrote:
> > > > > How are these different to the TEventObject,TSimpleEvent
> > > > > classes in syncobjs? Just curious, since I usually do with
> > > > > syncobjs, and I don't see a big difference between
> > > > > MyEvent.SetEvent/MyEvent.WaitFor and
> > > > > RTLEventSetEvent/RTLEventWaitFor
> > > >
> > > > If you look at the source of syncobjs, you'll notice teventobject
> > > > is just an OO coat for tbasicrtlevent.
> > >
> > > Last time I looked this is only true for Win32, the Unix version
> > > seems to be very different and is implemented with semaphores. Is
> > > there a reason why those routines are not simply based POSIX
> > > condition variables?
> >
> > Yes: a single source base. All 'basic' threading routines are in the
> > system unit, all the rest is based on that.
> 
> Yes, I figured that this was the idea. I don't have access to the 
> current SVN version (not before this evening when I am back home) to 
> adequately show what I mean, but - from my bad memory - the question 
> remains why
> 
> 1) the Unix version makes so strange and wild efforts to support WaitFor 
> with timeouts if there is pthread_cond_timed_wait() (and this is used 
> elsewhere already) and

This I don't know; I didn't implement it.

> 2) why the SyncObjs tEvent objects uses those semaphore stuff instead of 
> the fixed RTLEvents.

It's based on the Windows implementation, as far as I know ?

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to