On 09/07/2025 06:30, Vlad Khorsun wrote:
> 09.07.2025 5:09, Adriano dos Santos Fernandes:
>> Hi!
>>
>> We currently have a subset (talking about extern/boost, not
>> src/include/firebird/impl/boost) of boost library integrated in our
>> code. It's used only for unit tests.
>>
>> I propose we start to have open mind to discuss more adoption of it,
>> considering case-by-case, portability and performance. Specially its
>> header-only libraries, which integrates easily in our build.
>
> No objection in general.
Great.
>> A good example is IPC, which we have lot of OS-dependent, inflexible and
>> difficult to use code. And as pointed today, we have not even a simple
>> shared mutex.
>
> Here I'm not agree. We know our code very well and it is not difficult
> to use.
You helped a lot to make profiler IPC work after my initial bugged
implementation.
And it still has a hidden bug that I found myself difficult to fix
without an extra shared mutex. Of course, any implementation could have
bugs, but in this case I think I still have a point.
> What is very important - we can fix and adapt it when needed. And we have
> shared mutex.
>> The profiler has a bug
>> (
https://github.com/FirebirdSQL/firebird/issues/8639) and I see it can
>> be easily fixed using boost::interprocess::interprocess_mutex.
> Could you explain ? What boost's mutex have that we haven't ? Maybe we
> can
> help you ?
Sure, but I don't want to discuss specifics of this bug in this topic.
Actually, I detected this bug exploring a different new feature that I'm
still going to propose. So mixing three topics here is not going to help.
>> Boost is a success case and inspired a lot modern C++ std features. We'd
>> better use it than send time creating and maintaining complex non-core
>> code.
> First, I have no problem adapting external libraries, especially well-
> known
> and well maintained, as boost. But only when really necessary, for
> example if
> it implements something we missing. Next, IPC is an essential part of
> Firebird
> core and I see no reason to change its implementation just because
> someone not
> like it or not understand it. There must be more strong arguments.
>
I used it many times and all times it was difficult and probably there
is still bugs left.
There is no good documentation and of course, no widely usage (it's
exclusive in Firebird).
But I'm not proposing to start replacing Firebird IPC by boost code.
This is a proposal of boost as a general enabler, which an example of
it's IPC library.
I also talked about performance, so if third party code is easy to use
but do not meet current Firebird performance expectations were it really
matter, that third party code should not be used.
Adriano