[Top][All Lists]

[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 17:36: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

I'm not sure about the verb tense of "Ports will be thread-safe in Guile
2.2." because you said "[...] this situation is fixed in 2.2."

 doc/ref/api-io.texi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 02d92a2..de4020a 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -88,6 +88,11 @@ 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}).  Ports will be thread-safe in
+Guile 2.2.
 @rnindex input-port?
 @deffn {Scheme Procedure} input-port? x
 @deffnx {C Function} scm_input_port_p (x)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]