From 0fe718b1d9cf0109dd1e96a53df89f34b9a1fa93 Mon Sep 17 00:00:00 2001 From: Amarnath Karthi <97amarnathk@gmail.com> Date: Fri, 1 Nov 2019 23:32:42 +0530 Subject: [PATCH] docs: add Synchronous Messages Fiddle example (#20451) * docs: add Synchronous Messages Fiddle example * Code review changes * Add OS support info --- .../synchronous-messages/index.html | 27 +++++++++++++++++ .../synchronous-messages/main.js | 29 +++++++++++++++++++ .../synchronous-messages/renderer.js | 9 ++++++ 3 files changed, 65 insertions(+) create mode 100644 docs/fiddles/communication/two-processes/synchronous-messages/index.html create mode 100644 docs/fiddles/communication/two-processes/synchronous-messages/main.js create mode 100644 docs/fiddles/communication/two-processes/synchronous-messages/renderer.js diff --git a/docs/fiddles/communication/two-processes/synchronous-messages/index.html b/docs/fiddles/communication/two-processes/synchronous-messages/index.html new file mode 100644 index 0000000000..055fcf3473 --- /dev/null +++ b/docs/fiddles/communication/two-processes/synchronous-messages/index.html @@ -0,0 +1,27 @@ + + +
+ + + +You can use the ipc module to send synchronous messages between processes as well, but note that the synchronous nature of this method means that it will block other operations while completing its task.
This example sends a synchronous message, "ping", from this process (renderer) to the main process. The main process then replies with "pong".
+