From ec49b27cc3a85848fce176f786d08ed119f7fbdc Mon Sep 17 00:00:00 2001 From: Abhinav Gautam Date: Mon, 8 Oct 2018 20:17:51 +0530 Subject: [PATCH 1/2] Added section about thread safety --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 90bd2b65f..35c5dfcec 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,11 @@ npm install --global --production windows-build-tools All processes launched from node-pty will launch at the same permission level of the parent process. Take care particularly when using node-pty inside a server that's accessible on the internet. We recommend launching the pty inside a container to protect your host machine. +## Thread Safety + +node-pty is not thread safe and should only be used in a single thread. +see https://nodejs.org/api/worker_threads.html + ## Troubleshooting **Powershell gives error 8009001d** From 336dc2700e2f346a2c2da93d7825c81aece6e34a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 8 Oct 2018 16:41:15 -0700 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 35c5dfcec..9a8bc4bf9 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,7 @@ All processes launched from node-pty will launch at the same permission level of ## Thread Safety -node-pty is not thread safe and should only be used in a single thread. -see https://nodejs.org/api/worker_threads.html +Note that node-pty is not thread safe so running it across multiple worker threads in node.js could cause issues. ## Troubleshooting