Dorodnic, the RealSense SDK Manager, has posted some scripts in a multi-camera discussion over on the RealSense GitHub site. Read downward from the comment linked to below. The first of the scripts shows how to control individual sensors. The second script snippet, further down, uses pipeline and threads.
You can also scroll to the very top of the page to read this multiple camera discussion from the start.
14 August 2018 update Further scripts have been added to the discussion by Dorodnic and the user AntoineWefit, resulting in a script at the end of the discussion by Antoine that "will capture and save a picture for each connected D415 simultaneously (one can easily replace the picture capture with a pointcloud capture for example)".