Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-02

cthreads and cSemaphoreTimedWait

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

Hi,

the TThreadManager class has only the SemaphoreWait procedure and it lacks the SemaphoreTimedWait function. But in the cthreads unit exists a cSemaphoreTimedWait implementation.

Is there a problem with that function and didn't included in the TThreadManager class ?

I have some existed code to port and it uses semaphores. I would like to avoid change it too much.

regards,

Dimitrios Chr. Ioannidis http://www.nephelae.eu

Reply by email

Michael Van Canneyt
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 8 lines
Hi, the TThreadManager class has only the SemaphoreWait procedure and it lacks the SemaphoreTimedWait function. But in the cthreads unit exists a cSemaphoreTimedWait implementation. Is there a problem with that function and didn't included in the TThreadManager class ?

No particular problem.

I have some existed code to port and it uses semaphores. I would like to avoid change it too much.

I guess we can add it. In fact, it makes no sense to have a function without timeout, you can always specify -1 or some such value if you don't want a timeout.

Michael.

Reply by email