[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add observation that ports are not thread-safe
From: |
Diogo F. S. Ramos |
Subject: |
[PATCH] Add observation that ports are not thread-safe |
Date: |
Tue, 25 Mar 2014 08:14:28 -0300 |
It's not obvious that ports are not thread-safe and trying to have
multiple threads writing to one returns errors that are not
recognizable as been caused by this lack of thread-safeness.
* doc/ref/guile.texi: non thread-safe observation
---
doc/ref/api-io.texi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 02d92a2..e9f79ae 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -88,6 +88,10 @@ representation for output. There are three possible
strategies: to
raise an error, to replace the character with a hex escape, or to
replace the character with a substitute character.
+Ports are not thread-safe. A port has to be protected if you want to
+access it from multiple threads using mechanisms like mutexes.
+(@pxref{Mutexes and Condition Variables})
+
@rnindex input-port?
@deffn {Scheme Procedure} input-port? x
@deffnx {C Function} scm_input_port_p (x)
--
1.9.1
- [PATCH] Add observation that ports are not thread-safe,
Diogo F. S. Ramos <=