summaryrefslogtreecommitdiff
path: root/test-suite/tests/threads.test
Commit message (Collapse)AuthorAgeFilesLines
* Back to simple unlock-mutexAndy Wingo2016-11-051-9/+7
| | | | | | | | | * libguile/threads.c (scm_unlock_mutex): Bind to unlock-mutex. * libguile/threads.h: Remove scm_unlock_mutex_timed. * libguile/deprecated.h: Add scm_unlock_mutex_timed. * libguile/deprecated.c (scm_unlock_mutex_timed): Deprecate. * test-suite/tests/threads.test: Update unlock-mutex tests to use wait-condition-variable if they would wait on a cond.
* Remove unchecked-unlock facility from Guile mutexesAndy Wingo2016-11-051-5/+1
| | | | | | | | | * libguile/threads.c (fat_mutex): Remove unchecked_unlock member. (make_fat_mutex): Adapt. (scm_make_mutex_with_flags): Remove unchecked-unlock flag. (scm_make_recursive_mutex): Likewise. (fat_mutex_unlock): Remove unchecked-unlock case. * test-suite/tests/threads.test: Remove unchecked-unlock test.
* Remove fat mutex abandoned mutex errorAndy Wingo2016-11-051-9/+4
| | | | | | * libguile/threads.c (fat_mutex_lock): Remove abandoned mutex error, as SRFI-18 is responsible for this. * test-suite/tests/threads.test: Update test.
* Remove lock-mutex owner facilityAndy Wingo2016-11-041-12/+1
| | | | | | | | * libguile/threads.c (scm_lock_mutex_timed): Deprecate "owner" argument. (fat_mutex_lock): Remove owner argument. (fat_mutex_unlock): Don't pass owner to scm_lock_mutex_timed. * test-suite/tests/threads.test: Remove tests of mutex-owner.
* Remove thread cleanup facilityAndy Wingo2016-10-311-25/+4
| | | | | | | | | | | | | * 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.
* build: Support pthread builds without 'pthread_cancel' support (Android).Ludovic Courtès2014-07-041-1/+12
| | | | | | | | | | | | Reported by Sylvain Beucler <beuc@beuc.net>. * configure.ac: Check for 'pthread_cancel'. * libguile/threads.c (scm_cancel_thread): Conditionalize on !SCM_USE_PTHREAD_THREADS || defined HAVE_PTHREAD_CANCEL. * test-suite/tests/threads.test (require-cancel-thread): New procedure. ("timed joining fails if timeout exceeded", "join-thread returns timeoutval on timeout", "cancel succeeds", "handler result passed to join", "can cancel self"): Use it.
* futures: Limit the number of nested futures on the same stack.Ludovic Courtès2013-03-271-2/+7
| | | | | | | | | | | | | | | | | 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.
* an experiment: clearing the C stack in gc testsAndy Wingo2012-01-311-9/+2
| | | | | | | | | * test-suite/lib.scm (clear-stale-stack-references): New helper. * test-suite/tests/gc.test: * test-suite/tests/threads.test: Use the new helper. I removed the "unresolved" throw, as I'd like to see what the bots do with this.
* Arrange so that stack-cleaning loops in GC tests are not optimized out.Ludovic Courtès2011-09-181-3/+8
| | | | | | | | * test-suite/tests/gc.test (stack-cleanup): New procedure. ("Unused modules are removed"): Use it. * test-suite/tests/threads.test (stack-cleanup): Likewise. ("mutex with owner not retained (bug #27450)"): Use it.
* Move `{total,current}-processor-count' outside of `posix.c'.Ludovic Courtès2011-04-251-0/+14
| | | | | | | | | | | | | * libguile/posix.c (scm_total_processor_count, scm_current_processor_count): Move to... * libguile/threads.c: ... here. * libguile/posix.h (scm_total_processor_count, scm_current_processor_count): Move declarations to... * libguile/threads.h: ... here. * test-suite/tests/posix.test ("nproc"): Move tests to... * test-suite/tests/threads.test: ... here.
* Increase the timeout of timing-sensitive thread tests.Ludovic Courtès2011-04-221-4/+4
| | | | | | | * test-suite/tests/threads.test ("timed locking succeeds if mutex unlocked within timeout", "timed unlocking returns #t if condition signaled", "timed joining succeeds if thread exits within timeout"): Increase the timeout. Reported by Dale P. Smith <dsmich@roadrunner.com>.
* Implement `(ice-9 threads)' high-level constructs in terms of futures.Ludovic Courtès2010-12-161-3/+36
| | | | | | | | | | | * 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.
* Fix bug #27450 ("Fat mutexes not GC'd until their owner dies").Ludovic Courtès2009-09-151-2/+16
| | | | | | | | | * libguile/threads.c (do_thread_exit): Deal with `t->mutexes' being a weak list. (fat_mutex_lock): Use weak-car pairs when building up `t->mutexes'. * test-suite/tests/threads.test ("mutex-ownership")["mutex with owner not retained (bug #27450)"]: New test.
* Change Guile license to LGPLv3+Neil Jerram2009-06-171-13/+12
| | | | | | | | | | (Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
* Remove possible deadlock in scm_join_thread_timedNeil Jerram2009-05-271-1/+25
| | | | | | | | | * libguile/threads.c (scm_join_thread_timed): Recheck t->exited before looping round to call block_self again, in case thread t has now exited. * test-suite/tests/threads.test ("don't hang when joined thread terminates in SCM_TICK"): New test.
* Fix wait-condition-variable so that it doesn't leave asyncs blockedNeil Jerram2009-05-271-2/+41
| | | | | | | | | | * libguile/threads.c (fat_mutex_unlock): Unblock asyncs when breaking out of loop. * test-suite/tests/threads.test (asyncs-still-working?): New function, to test if asyncs are working (i.e. unblocked). Use this throughout threads.test, in particular before and after the "timed locking succeeds if mutex unlocked within timeout" test.
* Delete trailing whitespace.Neil Jerram2008-05-141-7/+7
|
* latest set of SRFI-18 support changes to core threadsJulian Graham2008-05-141-0/+46
|
* Core enhancements, by Julian Graham, to Guile's thread, mutex andNeil Jerram2008-03-081-1/+123
| | | | condvar primitives, in preparation for SRFI-18 support.
* Changes from arch/CVS synchronizationLudovic Courtès2007-10-201-4/+56
|
* merge from 1.8 branchKevin Ryde2006-06-171-27/+109
|
* merge from 1.8 branchKevin Ryde2006-04-161-1/+1
|
* The FSF has a new address.Marius Vollmer2005-05-231-2/+2
|
* Only test when 'threads are provided.Marius Vollmer2005-03-021-31/+31
|
* New file, exercising parallel.Kevin Ryde2003-06-191-0/+54