Andy Wingo
f927c70d42
Update join-thread docs
...
* doc/ref/api-scheduling.texi (Threads): Joining a foreign thread is an
error.
* NEWS: Update.
2016-11-21 18:35:08 +01:00
Andy Wingo
2c0c6414bb
Minor editing in api-scheduling.texi
...
* doc/ref/api-scheduling.texi: Fix a couple editing mistakes.
2016-11-06 18:29:05 +01:00
Andy Wingo
16fe02aa15
Update documentation on mutexes
...
* doc/ref/api-scheduling.texi (Mutexes and Condition Variables):
Update.
2016-11-06 18:11:25 +01:00
Andy Wingo
8d907758a0
Update mutex documentation
...
* doc/ref/api-scheduling.texi (Mutexes and Condition Variables): Add
foreboding preface.
2016-11-05 19:38:40 +01:00
Andy Wingo
10471f40fe
Fix typo in threads documentation
...
* doc/ref/api-scheduling.texi (Threads): Fix typo.
2016-11-02 19:10:33 +01:00
Andy Wingo
fcc6a7ba20
Deprecate critical sections
...
* NEWS: Deprecate critical sections.
* doc/ref/api-scheduling.texi (Critical Sections): Remove.
* libguile/async.c:
* libguile/async.h:
* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/threads.c:
* libguile/threads.h: Deprecate critical section API.
2016-11-01 23:48:42 +01:00
Andy Wingo
b2e7662ebe
Add scm_yield to manual alongside yield
...
* doc/ref/api-scheduling.texi (Threads): Mention scm_yield.
2016-11-01 19:58:06 +01:00
Andy Wingo
4280c818c2
api-scheduling.texi: Syntactic cleanups.
...
* doc/ref/api-scheduling.texi: Remove vestigial comments.
2016-11-01 19:40:19 +01:00
Andy Wingo
eeeee3297b
Remove thread cleanup facility
...
* NEWS: Add entry.
* doc/ref/api-scheduling.texi (Threads): Remove thread-cleanup docs.
* libguile/threads.c (guilify_self_1, do_thread_exit):
(scm_set_thread_cleanup_x, scm_thread_cleanup): Remove these.
* libguile/threads.h (scm_i_thread): Remove cleanup_handler.
* module/ice-9/threads.scm:
* module/ice-9/deprecated.scm (thread-cleanup, set-thread-cleanup!):
Remove.
* test-suite/tests/threads.test: Adapt to test cancel-thread return
values and not test thread-cleanup procs.
2016-10-31 22:37:46 +01:00
Andy Wingo
a7114ced5f
cancel-thread can take arguments
...
* doc/ref/api-scheduling.texi (Threads):
* module/ice-9/threads.scm (cancel-thread): Additional args to
cancel-thread will be returned by the thread.
2016-10-31 22:11:01 +01:00
Andy Wingo
a04739b31a
cancel-thread via asyncs, not pthread_cancel
...
* module/ice-9/threads.scm (cancel-tag): New variable.
(cancel-thread): New Scheme function.
(call-with-new-thread): Install a prompt around the thread.
* libguile/threads.h (scm_i_thread): Remove cancelled member.
* libguile/threads.c (scm_cancel_thread): Call out to Scheme. Always
available, and works on the current thread too.
(scm_set_thread_cleanup_x, scm_thread_cleanup): Adapt.
(scm_init_ice_9_threads): Capture cancel-thread var.
* doc/ref/api-scheduling.texi (Threads): Update.
* NEWS: Update.
2016-10-27 21:22:28 +02:00
Andy Wingo
d74e0fed0d
Move thread bindings to (ice-9 threads)
...
* libguile/init.c (scm_i_init_guile): Don't call scm_init_thread_procs.
* libguile/threads.c (scm_init_ice_9_threads): Rename from
scm_init_thread_procs, make static.
(scm_init_threads): Register scm_init_thread_procs extension.
* libguile/threads.h (scm_init_thread_procs): Remove decl.
* module/ice-9/boot-9.scm: Load (ice-9 threads), so that related side
effects occur early.
* module/ice-9/deprecated.scm (define-deprecated): Fix to allow
deprecated bindings to appear in operator position. Export deprecated
bindings.
(define-deprecated/threads, define-deprecated/threads*): Trampoline
thread bindings to (ice-9 threads).
* module/ice-9/futures.scm: Use ice-9 threads.
* module/ice-9/threads.scm: Load scm_init_ice_9_threads extension.
Reorder definitions and imports so that the module circularity
with (ice-9 futures) continues to work.
* module/language/cps/intmap.scm:
* module/language/cps/intset.scm:
* module/language/tree-il/primitives.scm: Use (ice-9 threads).
* module/language/cps/reify-primitives.scm: Reify current-thread
in (ice-9 threads) module.
* module/srfi/srfi-18.scm: Use ice-9 threads with a module prefix, and
adapt all users. Use proper keywords in module definition form.
* test-suite/tests/filesys.test (test-suite):
* test-suite/tests/fluids.test (test-suite):
* test-suite/tests/srfi-18.test: Use ice-9 threads.
* NEWS: Add entry.
* doc/ref/api-scheduling.texi (Threads): Update.
* doc/ref/posix.texi (Processes): Move current-processor-count and
total-processor-count docs to Threads.
2016-10-23 22:29:44 +02:00
Andy Wingo
efcc30fc34
Small api-scheduling.texi reorder
...
* doc/ref/api-scheduling.texi: Put "Threads" section at beginning of
scheduling chapter.
2016-10-18 21:25:42 +02:00
Andy Wingo
51d322b2d4
Update "Asyncs" section of manual.
...
* doc/ref/api-scheduling.texi (Asyncs): Update.
2016-10-18 21:24:01 +02:00
Andy Wingo
59f09d185b
Deprecate user asyncs
...
* libguile/async.c:
* libguile/async.h:
* libguile/deprecated.c:
* libguile/deprecated.h (scm_async, scm_async_mark, scm_run_asyncs):
Deprecate these functions, which comprise the "users asyncs" facility.
* module/oop/goops.scm: Adapt to <async> deprecation.
* doc/ref/api-scheduling.texi:
* doc/ref/libguile-concepts.texi:
* doc/ref/libguile-foreign-objects.texi:
* doc/ref/posix.texi: Remove documentation on user asyncs, and replace
references to "system asyncs" to be just "asyncs".
2016-10-17 21:58:08 +02:00
Andy Wingo
56d8d9a257
Deprecate arbiters
...
* libguile/arbiters.c:
* libguile/arbiters.h:
* test-suite/tests/arbiters.test: Delete files.
* libguile/deprecated.c:
* libguile/deprecated.h: Move arbiters code here.
* doc/ref/api-scheduling.texi: Remove section on arbiters.
* libguile.h:
* libguile/Makefile.am:
* libguile/init.c:
* module/oop/goops.scm:
* test-suite/Makefile.am: Remove mention of arbiters.
* NEWS: Update.
2016-10-17 21:29:05 +02:00
Andy Wingo
3425290a7b
Add atomic boxes
...
* doc/ref/api-scheduling.texi (Atomics): New manual section.
* libguile.h: Include atomic.h.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Add atomic.
* libguile/atomic.c:
* libguile/atomic.h: New files.
* libguile/atomics-internal.h (scm_atomic_set_scm, scm_atomic_ref_scm)
(scm_atomic_swap_scm, scm_atomic_compare_and_swap_scm): New
facilities.
* libguile/goops.c (class_atomic_box, scm_sys_goops_early_init): Add
support for <atomic-box>. Remove duplicate <keyword> fetch.
* libguile/init.c (scm_i_init_guile): Call scm_register_atomic_box.
* libguile/print.c (iprin1): Add atomic box case.
* libguile/tags.h (scm_tc7_atomic_box): New tag.
* libguile/validate.h (SCM_VALIDATE_ATOMIC_BOX): New macro.
* module/Makefile.am (SOURCES): Add ice-9/atomic.scm.
* module/ice-9/atomic.scm: New file.
* module/oop/goops.scm (<atomic-box>): New var.
2016-09-06 11:16:53 +02:00
Mark H Weaver
2a1d8403c0
Allow #f as timeout argument to unlock-mutex and SRFI-18 mutex-unlock!
...
Reported by Chaos Eternal <chaoseternal@shlug.org>
Based on a patch by Nala Ginrut <nalaginrut@gmail.com>
* libguile/threads.c (scm_unlock_mutex_timed): If 'timeout' argument
is false, interpret that as no timeout.
* doc/ref/api-scheduling.texi (Mutexes and Condition Variables):
Update documentation.
2013-06-10 02:34:21 -04:00
Ludovic Courtès
8a177d316c
futures: Limit the number of nested futures on the same stack.
...
Fixes <http://bugs.gnu.org/13188 >.
Reported by Nala Ginrut <nalaginrut@gmail.com>.
* module/ice-9/futures.scm (%nesting-level): Rename to...
(%nesting-level): ... this. Default to 0 instead of #f. Update
users.
(%max-nesting-level): New variable.
(touch): When FUTURE is queued and (%nesting-level) is above
%MAX-NESTING-LEVEL, abort to %FUTURE-PROMPT.
* test-suite/tests/future.test ("nested futures")["loop"]: Remove
`compile' call.
* test-suite/tests/threads.test ("par-map")["long list"]: New test.
* doc/ref/api-scheduling.texi (Futures): Add a paragraph about stack
consumption.
2013-03-27 18:09:49 +01:00
Jason Earl
a4b4fbbdaa
excise use of "iff" in the manual
...
* doc/ref/api-compound.texi:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/api-utility.texi:
* doc/ref/compiler.texi:
* doc/ref/intro.texi:
* doc/ref/scheme-using.texi:
* doc/ref/sxml.texi:
* doc/ref/web.texi: Change uses of "iff" to "if, otherwise". Fixes bug
10302.
2013-03-10 22:29:18 +01:00
Andy Wingo
a6bd32406d
add fluid->parameter
...
* module/ice-9/boot-9.scm (make-parameter): Add a docstring.
(fluid->parameter): New interface. Use it when turning port fluids
into parameters.
* doc/ref/api-scheduling.texi (Parameters): Deffn instead of defun for
make-parameter documentation. Add docs for fluid->parameter.
2013-01-22 15:17:50 +01:00
Ludovic Courtès
a638be152c
doc: Document nested futures.
...
* doc/ref/api-scheduling.texi (Futures): Mention nested futures.
Explain what happens upon `touch'.
2012-11-29 22:44:12 +01:00
Bake Timmons
df0a100250
Make notation for Scheme repeated arguments more consistent in manual.
...
* doc/ref/api-compound.texi
* doc/ref/api-control.texi
* doc/ref/api-data.texi
* doc/ref/api-debug.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-macros.texi
* doc/ref/api-memory.texi
* doc/ref/api-modules.texi
* doc/ref/api-procedures.texi
* doc/ref/api-regex.texi
* doc/ref/api-scheduling.texi
* doc/ref/api-utility.texi
* doc/ref/goops.texi
* doc/ref/match.texi
* doc/ref/misc-modules.texi
* doc/ref/posix.texi
* doc/ref/r6rs.texi
* doc/ref/scheme-using.texi
* doc/ref/srfi-modules.texi
* doc/ref/sxml-match.texi: Make notation for Scheme repeated arguments more
consistent in manual.
2012-02-04 00:10:13 +01:00
Bake Timmons
64de6db5c6
Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
...
* doc/r5rs/r5rs.texi:
* doc/ref/api-compound.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/compiler.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/scheme-using.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* doc/sources/env.texi: Make usage of variable names of function definitions
more consistent.
2012-02-02 12:04:16 +01:00
Andy Wingo
99db1bc2e2
Move parameters documentation to core
...
* doc/ref/api-scheduling.texi (Fluids and Dynamic States): Update for
default values.
(Parameters): Move here from srfi-39, and adapt.
2012-01-12 00:10:25 +01:00
Neil Jerram
679cceeda4
Misc textual editing
...
* doc/ref/api-scheduling.texi (Asyncs): "queueing" -> "queuing".
* benchmark-suite/lib.scm, doc/sources/unix.texi (Unix conventions),
test-suite/lib.scm: "postpend" -> "append".
* doc/ref/api-compound.texi (Array Syntax, Dictionary Types),
doc/ref/api-control.texi (Catch), doc/ref/api-data.texi (Complex
Numbers, Conversion, Random, Symbol Props, Symbol Uninterned),
doc/ref/api-options.texi (Build Config, Common Feature Symbols),
doc/ref/api-regex.texi (Match Structures),
doc/ref/api-undocumented.texi, doc/ref/compiler.texi (Tree-IL,
GLIL), doc/ref/data-rep.texi (Immediate objects), doc/ref/goops.texi
(Slot Description Example), doc/ref/history.texi (A Scheme of Many
Maintainers, Status), doc/ref/libguile-program.texi (Available
Functionality), doc/ref/misc-modules.texi (Formatted Output),
doc/ref/mod-getopt-long.texi (getopt-long Reference),
doc/ref/posix.texi (Network Socket Address, Network Sockets and
Communication), doc/ref/srfi-modules.texi (SRFI-1 Association Lists,
SRFI-10, SRFI-19 String to date, SRFI-27 Random Sources),
doc/ref/vm.texi (Instruction Set, Top-Level Environment
Instructions, Procedure Call and Return Instructions),
doc/sources/unix.texi (Unix conventions): Correct spacing after
"i.e." and "e.g.".
2011-02-13 22:13:33 +00:00
Ralf Wildenhues
ecb8733562
docs: fix typos in manual, and a couple in code comments.
...
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
doc/ref/api-control.texi, doc/ref/api-debug.texi,
doc/ref/api-io.texi, doc/ref/api-macros.texi,
doc/ref/api-procedures.texi, doc/ref/api-scheduling.texi,
doc/ref/api-undocumented.texi, doc/ref/api-utility.texi,
doc/ref/compiler.texi, doc/ref/goops.texi,
doc/ref/libguile-concepts.texi, doc/ref/misc-modules.texi,
doc/ref/posix.texi, doc/ref/r6rs.texi, doc/ref/slib.texi,
doc/ref/srfi-modules.texi, doc/ref/sxml-match.texi,
doc/ref/tools.texi, doc/ref/vm.texi, doc/ref/web.texi,
doc/sources/env.texi, doc/sources/jimb-org.texi,
doc/sources/scheme-concepts.texi, doc/sources/unix.texi,
module/ice-9/optargs.scm: Fix typos.
* doc/r4rs/r5rs.texi: Likewise. Do not capitalize code symbols
even at the start of a sentence.
* doc/ref/api-data.texi: Likewise. Also, remove executable bit.
2011-02-09 22:28:49 +00:00
Ludovic Courtès
3e0e4f1d87
Clarify doc regarding threading of par-map' and
par-for-each'.
...
* doc/ref/api-scheduling.texi (Parallel Forms): Refine wording for
`par-map' and `par-for-each'.
2010-12-17 21:55:56 +01:00
Andy Wingo
d09c07fb10
document make-unbound-fluid et al
...
* doc/ref/api-scheduling.texi (Fluids and Dynamic States): Document the
new fluid routines.
* NEWS: Update.
2010-12-17 13:14:13 +01:00
Ludovic Courtès
c21a5ddcaf
Implement `(ice-9 threads)' high-level constructs in terms of futures.
...
* module/ice-9/threads.scm (parallel, par-mapper): Rewrite in terms of
`future' and `touch'.
* test-suite/tests/threads.test ("par-map", "par-for-each"): New test
prefixes.
* doc/ref/api-scheduling.texi (Parallel Forms): Add cross-ref to
futures. Recommend against the `n-' variants.
2010-12-16 23:45:24 +01:00
Ludovic Courtès
51fc066ae2
Use `current-processor-count' to determine the number of future-workers.
...
* module/ice-9/futures.scm (%worker-count): Use
`current-processor-count'.
* doc/ref/api-scheduling.texi (Futures): Add note about side-effects and
I/O. Mention `current-processor-count'.
2010-12-07 23:13:20 +01:00
Ludovic Courtès
0d4e6ca38f
Add `(ice-9 futures)'.
...
* doc/ref/api-scheduling.texi (Threads): Add short introduction.
Mention the `threads' feature. Add cross-reference to futures.
(Futures): New node.
* module/Makefile.am (ICE_9_SOURCES): Add `ice-9/futures.scm'.
* module/ice-9/futures.scm: New file.
* test-suite/Makefile.am (SCM_TESTS): Add `tests/future.test'.
* test-suite/tests/future.test: New file.
2010-12-03 00:38:29 +01:00
Neil Jerram
2a7758fe23
Remove page breaks except before new chapters and indices
...
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
doc/ref/api-control.texi, doc/ref/api-data.texi,
doc/ref/api-debug.texi, doc/ref/api-evaluation.texi,
doc/ref/api-i18n.texi, doc/ref/api-io.texi, doc/ref/api-memory.texi,
doc/ref/api-modules.texi, doc/ref/api-options.texi,
doc/ref/api-overview.texi, doc/ref/api-procedures.texi,
doc/ref/api-scheduling.texi, doc/ref/api-smobs.texi,
doc/ref/api-translation.texi, doc/ref/api-utility.texi,
doc/ref/expect.texi, doc/ref/libguile-concepts.texi,
doc/ref/libguile-program.texi, doc/ref/misc-modules.texi,
doc/ref/repl-modules.texi, doc/ref/scheme-debugging.texi,
doc/ref/scheme-reading.texi, doc/ref/scheme-scripts.texi,
doc/ref/script-getopt.texi, doc/ref/scsh.texi,
doc/ref/srfi-modules.texi: Remove @page before @section.
2009-12-19 00:58:54 +00:00
Ken Raeburn
9515ef7237
Since support for "futures" in C has been completely disabled for some
...
time, and should be easily implementable in Scheme with the current
thread support, delete the C code.
* libguile/futures.c, libguile/futures.h: Delete.
* libguile/Makefile.am (libguile_la_SOURCES, DOT_X_FILES,
DOT_DOC_FILES, modinclude_HEADERS): Delete references to futures.*
files.
* libguile.h: Don't include futures.h.
* libguile/eval.c: Don't include futures.h.
(isymnames): Delete "#@future" entry.
(scm_m_future, s_future, scm_sym_future, unmemoize_future,
unmemoize_builtin_macro): Delete disabled futures code.
* libguile/eval.i.c (CEVAL): Delete disabled futures code.
* libguile/init.c: Don't include futures.h.
(scm_i_init_guile): Delete disabled futures initialization call.
* libguile/tags.h (SCM_IM_FUTURE): Delete.
(SCM_IM_CALL_WITH_VALUES, SCM_IM_ELSE, SCM_IM_ARROW,
SCM_IM_NIL_COND, SCM_IM_BIND): Renumber.
* doc/ref/api-scheduling.texi: Delete commented-out node on Futures.
* doc/maint/guile.texi: Delete make-future and future-ref mentions.
2009-10-30 18:40:41 -04:00
Ludovic Courtès
d3d6614791
Update `scm_without_guile ()' documentation.
...
* doc/ref/api-scheduling.texi (Blocking): Mention that
`scm_without_guile ()' & co. aren't needed any longer.
2009-09-14 00:42:25 +02:00
Neil Jerram
ce2612cd88
Move `Continuation Barriers' to the section that covers continuations
...
Since continuation barriers protect against non-local exits, it makes
better sense to document them in the same section as continuations and
exceptions.
2009-08-03 13:21:33 +01:00
Neil Jerram
1021bb7a8d
Review/update sections on arbiters and asyncs
2009-08-03 12:04:08 +01:00
Neil Jerram
74926120a3
Delete trailing whitespace.
2008-05-14 23:52:49 +01:00
Julian Graham
adc085f17c
latest set of SRFI-18 support changes to core threads
2008-05-14 23:33:16 +01:00
Neil Jerram
9c9b203b80
(Mutexes and Condition Variables): Change
...
`flag' to `flags' in docstring.
2008-03-24 21:50:51 +00:00
Neil Jerram
6180e336b2
Core enhancements, by Julian Graham, to Guile's thread, mutex and
...
condvar primitives, in preparation for SRFI-18 support.
2008-03-08 16:22:40 +00:00
Neil Jerram
300b1ae58a
(Threads): Add "C Function scm_join_thread"
...
to doc for join-thread. Thanks to Antoine Mathys for reporting
that scm_join_thread was missing.
2008-02-01 21:02:15 +00:00
Ludovic Courtès
07e02175a0
Changes from arch/CVS synchronization
2007-10-29 22:03:37 +00:00
Kevin Ryde
23f2b9a3de
merge from 1.8 branch
2006-06-17 23:15:59 +00:00
Kevin Ryde
1b09b607dd
merge from 1.8 branch
2006-04-16 23:18:55 +00:00
Marius Vollmer
cc19cda7a8
Removed "Futures" node.
2006-01-29 19:45:54 +00:00
Marius Vollmer
661ae7ab6b
Renamed the "frames" that are related to dynamic-wind to "dynamic
...
contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
Updated documentation.
2006-01-29 00:23:28 +00:00
Marius Vollmer
54428bb84e
Removed scm_leave_guile, scm_enter_guile and all references to
...
them since they are no longer in the API.
2005-12-06 20:27:59 +00:00
Kevin Ryde
c211008171
{} groups around "void*" C return types.
2005-06-05 20:44:53 +00:00
Marius Vollmer
2567692aeb
Moved up section on mutexes and condition variables. Added critical
...
"Critical Sections" section.
2005-03-07 21:49:43 +00:00