Morphing multiple executables into one application

I have three legacy applications that use a lot of source code and data. Multiple instances of each of these applications are executed by the user at any time, for example. At the same time, a dozen mixed application executions can be involved. These applications currently interact using shared memory and messaging methods so that they can support overall cursor positioning, etc. Applications are written primarily in C ++, use Qt, and work for a total of approximately 5 million lines of code. Only some of the existing codes are thread safe.

I want to combine these three executables into one executable file and use a multi-threaded function that allows multiple instances of each of the three branches of functionality to be executed simultaneously. It has been suggested that I consider some of the features provided by Boost, for example. shared pointers and use OpenMP to organize the overall execution of multiple threads.

Any comments on how to proceed will be appreciated, in particular links to the best way to solve this refactoring problem.

+3
source share
3 answers

( , ), , , .

- , .

( Robert C. Martin) , .

( ) , , - .

+3

, - . , . , - ( ) .

, , .

  • , , , , . , , 5 , . . , , , MT .

  • "" , , . , . , . . , . , 5 . 5 , , .

  • 1 . , - . , - , 2. , , 3 . , , . - 1 , , .

+2

"... 5 ..." ... , , "" , , , . Simian CPD.

5 million lines is a lot of code. Of course, you may need this, but I assume that you do not.

You definitely need a good reason to change a code base such as multi-threaded, especially in C ++. Doing this without first cleaning is a recipe for disaster.

0
source

Source: https://habr.com/ru/post/1715126/


All Articles