1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Update join-thread docs

* doc/ref/api-scheduling.texi (Threads): Joining a foreign thread is an
  error.
* NEWS: Update.
This commit is contained in:
Andy Wingo 2016-11-21 18:34:41 +01:00
parent 1e92511996
commit f927c70d42
2 changed files with 17 additions and 8 deletions

9
NEWS
View file

@ -54,7 +54,7 @@ deprecated; use `scm_timed_lock_mutex' instead.
It used to be that `unlock-mutex' included `wait-condition-variable'
functionality. This has been deprecated; use SRFI-18 if you want this
behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed is
behavior from `mutex-unlock!'. Relatedly, `scm_unlock_mutex_timed' is
deprecated; use `scm_unlock_mutex' instead.
** Removed `unchecked-unlock' mutex flag
@ -73,6 +73,13 @@ The `set-thread-cleanup!' and `thread-cleanup' functions that were added
in Guile 2.0 to support cleanup after thread cancellation are no longer
needed, since threads can declare cleanup handlers via `dynamic-wind'.
** Only threads created by Guile are joinable
`join-thread' used to work on "foreign" threads that were not created by
Guile itself, though their join value was always `#f'. This is no
longer the case; attempting to join a foreign thread will throw an
error.
* New deprecations
** Arbiters deprecated

View file

@ -88,13 +88,15 @@ Return @code{#t} ff @var{obj} is a thread; otherwise, return
@deffn {Scheme Procedure} join-thread thread [timeout [timeoutval]]
@deffnx {C Function} scm_join_thread (thread)
@deffnx {C Function} scm_join_thread_timed (thread, timeout, timeoutval)
Wait for @var{thread} to terminate and return its exit value. Threads
that have not been created with @code{call-with-new-thread} or
@code{scm_spawn_thread} have an exit value of @code{#f}. When
@var{timeout} is given, it specifies a point in time where the waiting
should be aborted. It can be either an integer as returned by
@code{current-time} or a pair as returned by @code{gettimeofday}.
When the waiting is aborted, @var{timeoutval} is returned (if it is
Wait for @var{thread} to terminate and return its exit value. Only
threads that were created with @code{call-with-new-thread} or
@code{scm_spawn_thread} can be joinable; attempting to join a foreign
thread will raise an error.
When @var{timeout} is given, it specifies a point in time where the
waiting should be aborted. It can be either an integer as returned by
@code{current-time} or a pair as returned by @code{gettimeofday}. When
the waiting is aborted, @var{timeoutval} is returned (if it is
specified; @code{#f} is returned otherwise).
@end deffn