Combine two Driveworks samples to one exe

I’m trying to combine the examples drivenet and lidar_replay so that I get one exe that starts both examples.

But in DriveworksSample.cpp is a Singelton wich prevents the creation of multiple apps . A runtime error is caused with the following message “Can only create one app in the process.”
Can you give me detailed information about the reason for the singleton?

As a first step I did the following:

I tried running the classes on a separate thread each. Sometimes it works and both examples run. But in most cases, a segmentation error occurs.
I know that the class “DriveWorksSample” is inherited in both classes (LidarReplaySample and DriveNetSimpleApp). So I tried to find out where the segmentation error occurs. However, the error occurs in different places.

Before I take any further steps, I wanted to ask how much you estimate the effort to combine two driveworks examples?

**Hardware Platform: [Example: DRIVE AGX Xavier Developer Kit]
Software Version: Example: DRIVE Software 10
**Host Machine Version: Example: native Ubuntu 18.04

Thanks in advance

Dear @jan.haenle,
The DW samples are just demonstration of usage of APIs. Generally, You can choose to pick up needed APIs/code snippets from another sample and fit into your code to combine two apps. You can combine snippets from intilization,deintilization,command-line args, onProcess. However, I dont understand your usecase of combing drivenet with lidar replay sample.

Thank you for your reply.
The use case is as follows:
I have a Velodyne VL32 Sensor and a camera with an ar0231 imager. I want to build an executebal to display both data at the same time. In other words, I want an executable with which two windows are opened and the lidar data is displayed in one window (lidar_replay example) and the camera data with object detection is displayed in the other window (Drivnet example). Are there perhaps similar examples or use cases that I can use for orientation?