[Lazarus] Cross OS API Wrappers

R0b0t1 r030t1 at gmail.com
Mon Jul 10 08:12:05 CEST 2017


Hello,

I was wondering if cross-platform (Linux, BSD, Windows) wrappers exist
for certain goals like "create a system timer" or "use asynchronous
IO."

A good example would be a class which uses timerfds and epoll on
Linux, kqueues and kevent on BSD, or Waitable Timers on Windows to do
very accurate asynchronous timing. The typical solution to a lot of
problems like this (as seen on the Lazarus IDE forums, but also on
answers on other sites tagged as using Delphi) is to use more threads.
This works but isn't necessarily an ideal solution.

I have personal interest in adding code to accomplish things like the
above, but some of the names would conflict with things which already
behave in a certain way (i.e. I can't call the class outlined above
"TTimer"). Is there a recommended way to name things and a recommended
place to add what I want to do to either the FP units or the LCL?

R0b0t1.


More information about the Lazarus mailing list