[fpc-devel] Re: [lazarus] Why TSemaphore not implemented for Win32?
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Fri Nov 2 09:24:22 CET 2007
On 10/30/07, 12 12 <xxxiter at rambler.ru> wrote:
> Why TSemaphore not implemented for Win32?
AFAIK TSemaphore is just an alias to different semaphore names on
different unixes.
So it would never work on Win32 by definition.
> but CreateSemaphore present in Delphi!
No it's not. It's a Windows API. It's not directly connected to Delphi.
Nevertheless, I for one, am interrested in having a cross-platform
semaphores solution. I find them quite useful, specially after having
the theory at the university.
What do others think about how such functionality could be implemented?
We could write a procedural interface with some functions like
CreateSemaphore, OpenSemaphore, CloseSemaphore, etc. Also the 2
classical operations P and V (I don't remember the descriptive names
for them)
And TSemaphore could be the handle passed by such functions, or a new
type could be created to avoid confusion.
Ah, by the way, I am moving this discussion to fpc-devel, since it's
more appropriate here.
thanks,
--
Felipe Monteiro de Carvalho
More information about the fpc-devel
mailing list