unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Add observation that ports are not thread-safe
@ 2014-03-25 11:14 Diogo F. S. Ramos
  2014-03-25 14:14 ` Andy Wingo
  0 siblings, 1 reply; 12+ messages in thread
From: Diogo F. S. Ramos @ 2014-03-25 11:14 UTC (permalink / raw)
  To: guile-devel

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




^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-04-15 11:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 11:14 [PATCH] Add observation that ports are not thread-safe Diogo F. S. Ramos
2014-03-25 14:14 ` Andy Wingo
2014-03-25 17:10   ` Diogo F. S. Ramos
2014-03-25 19:39     ` Andy Wingo
2014-03-25 20:36       ` Diogo F. S. Ramos
2014-04-15 11:24         ` Diogo F. S. Ramos
2014-03-26  5:10   ` Guile's I/O procedures should *not* do thread synchronization Mark H Weaver
2014-03-26  8:25     ` Andy Wingo
2014-03-26 15:32       ` Mark H Weaver
2014-03-26 19:45         ` Andy Wingo
2014-04-06  6:08           ` Mark H Weaver
2014-04-08 20:53             ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).