A multithreaded implementation of the ‘which’ command

Here is an implementation of the ‘which‘ command which can tell where programs are located. /* SPDX-FileCopyrightText: 2021-2022 John Scott <jscott@posteo.net> * SPDX-License-Identifier: GPL-3.0-or-later */ /* We do not support the obsolete extension where an * omitted directory name is interpreted as the current * working directory. In $PATH = “/usr::/bin:”, the lack * of … Read more

Using Boost.Lockfree queue is slower than using mutexes

Until now I was using std::queue in my project. I measured the average time which a specific operation on this queue requires. The times were measured on 2 machines: My local Ubuntu VM and a remote server. Using std::queue, the average was almost the same on both machines: ~750 microseconds. Then I “upgraded” the std::queue … Read more