|Hi guys

A number of threads need to access an object, but no more than three threads 
must access simultaneously.

Thats a job for a semaphore someone said.|||I understand|that under Delphi and 
Windows something like this could be used:

FSemaphoreHandle:=  CreateSemaphore(nil,  3,  3,  nil);
||WaitForSingleObject(FSemaphoreHandle,  <timeout>);|

How to do that under Lazarus and Linux?

I have found TThreadManager with its SemaphoreInit and SemaphoreWait etc. But 
how to use it, especially how do you specify the number of threads that can 
access the object?

Using 32 bit Lazarus trunk and FPC trunk.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to