This is incorrect.you can switch CPU but every Thread or RunShell() from EXE will run on same CPU like EXE
I wrote an Xbase++ application for a company that manufactures Hi-sensitivity metal detector portals.
This app needed to also have a camera application running that captured a video of people walking thru the portal.
The camera was using so much processor time that it would make the portal metal detection software fail because it communicates via IP with 2 microprocessors. I solved the problem by creating a separate camera program, also written in Xbase++, that runs on a different processor.
The Portal.Exe program launches the Camera.Exe program and then they communicate via a common shared file system.
Code: Select all
// Start of Portal.Exe
IF !DC_IsAppRunning('XbpDialog',cTitle,'CAMERA.EXE',.t.) .AND. Fexists('Camera.Exe')
RunShell('','Camera.Exe',.t.,.t.)
ENDIF
// Start of Camera.Exe
IF DC_IsAppRunning('XbpDialog',cTitle,'CAMERA.EXE',.t.) .AND. Fexists('Camera.Exe')
QUIT
ENDIF
DC_SetCpu(15,DC_Path(AppName(.t.))+'SetCpu.Smp')