Using ipc
to send messages between processes asynchronously is the preferred method since it will return when finished without blocking other operations in the same process.
This example sends a "ping" from this process (renderer) to the main process. The main process then replies with "pong".