Sign in Join

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

Mailing lists / fpc-pascal / 2016-11

Does FPC has anything like TCriticalSection.Acquire with timeout?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Dennis

If a CriticalSection can acquire (but with a timeout), it can avoid any gridlock.

I googled and Delphi seems to have function which does time out

function  MonitorEnter(const  AObject:  TObject;  Timeout:  Cardinal  =  INFINITE):  Boolean; How can I do the same in FPC? Dennis

Reply by email

Graeme Geldenhuys
to Dennis
Dennis wrote
How can I do the same in FPC?

You can take a look at tiOPF's tiSemaphore.pas unit in the 'tiopf2' branch. tiOPF source code is hosted on SourceForge.net

Regards,
Graeme

Reply by email