diff options
author | Andy Wingo <wingo@pobox.com> | 2016-08-31 19:00:27 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-08-31 19:10:35 +0200 |
commit | b8a53b98b33dc89b0ed526ca66232655d24f2ce8 (patch) | |
tree | 82d587231e835060cfbc04eb97e08acbceda3d06 /doc/ref/api-io.texi | |
parent | cc9e72bd2b896048af2a65c8af9a57868df4352f (diff) | |
download | guile-b8a53b98b33dc89b0ed526ca66232655d24f2ce8.tar.gz |
Only ptob->close() after read/write finish
* libguile/Makefile.am (noinst_HEADERS): Add atomics-internal.h.
* libguile/atomics-internal.h: New file.
* libguile/ports-internal.h (refcount): New member.
* libguile/ports.c (release_port, scm_dynwind_acquire_port): New
facility for acquiring a port within a dynwind.
(scm_port_poll, scm_i_read_bytes, scm_setvbuf, scm_end_input)
(scm_i_write_bytes, scm_char_ready_p, scm_seek)
(scm_truncate_file, trampoline_to_c_read)
(trampoline_to_c_write): Acquire port.
(scm_c_make_port_with_encoding): Init refcount to 1.
(scm_close_port): Release port.
* doc/ref/api-io.texi (I/O Extensions): Add documentation
Diffstat (limited to 'doc/ref/api-io.texi')
-rw-r--r-- | doc/ref/api-io.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index e4e4f36ab..9facb38e0 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -1694,6 +1694,13 @@ operating system inform Guile about the appropriate buffer sizes for the particular file opened by the port. @end table +Note that calls to all of these methods can proceed in parallel and +concurrently and from any thread up until the point that the port is +closed. The call to @code{close} will happen when no other method is +running, and no method will be called after the @code{close} method is +called. If your port implementation needs mutual exclusion to prevent +concurrency, it is responsible for locking appropriately. + @node Non-Blocking I/O @subsection Non-Blocking I/O |