Tuesday, December 08, 2020

Readers-writer lock - Part 2: Implementation

In the previous installment I introduced the idea of a readers-writer lock. Today I'll look into readers-writer lock implementations (yes, multiple) that are available in the Delphi run-time library.

Sunday, November 08, 2020

Readers-writer lock - Part 1: Why?

One of the pleasant surprises in Delphi 10.4.1 was the addition of a new readers-writer lock implementation TLightweightMREW. While it was probably not noticed by most of the users, I was quite happy to see it implemented. 

So now you are asking yourself - what is this readers-writer lock and why am I so happy to see it in Delphi? Well, I'm glad that you're asking! Let me explain ...

In multithreaded programming (as most of my horror stories start), we frequently run into a problem of resource sharing. Two threads want to modify a shared resource at the same time and that can cause many problems, from information being overwritten to corrupted data and program crashes.

To fix this, we add resource protection. Usually that is just a critical section (typically through a TCriticalSection wrapper), or Delphi's TMonitor. Sometimes, however, protecting resources with a simple critical section causes an unnecessary performance drop, and that's when a readers-writer lock (may) come into play.

Saturday, May 30, 2020

OmniThreadLibrary 3.07.8

New OmniThreadLibrary is out! Get it while it’s hot!

Version 3.07.8 is mostly a bugfix release. It fixes few small bugs and enables support for Delphi 10.4.

You can get it now on git, download the ZIP archive, install it with Delphinus or with GetIt (in few days).

For more information, visit OmniThreadLibrary home page or write your question on the forum.

Wednesday, May 27, 2020

Top three Delphi 10.4 features

Delphi 10.4 has just been released (turn here for a great overview) and has some nice enhancements even for us, die-hard Windows developers. It is too early to give any deep analysis as I have just installed it and did not do any thorough testing, but I can already pick my top three new features. In no particular order, here they are:

Friday, February 14, 2020

Long live Delphi!

Something great has happened on this day, 25 years ago.

It was the sign of Aquarius. People were listening to Creep. And the AppBuilder was released.

You don’t know AppBuilder? Sure you do! It was developed andthanks to Novell — released under codename Delphi.

Indeed, our beloved Delphi is 25 years old today! A quarter of a century!