1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

18 commits

Author SHA1 Message Date
Andy Wingo
5270a001ad an experiment: clearing the C stack in gc tests
* 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.
2012-01-31 17:57:13 +01:00
Ludovic Courtès
1e2b4920ca Arrange so that stack-cleaning loops in GC tests are not optimized out.
* 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.
2011-09-18 21:41:25 +02:00
Ludovic Courtès
d20912e67d Move {total,current}-processor-count' outside of posix.c'.
* 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.
2011-04-25 22:41:58 +02:00
Ludovic Courtès
ed756f7817 Increase the timeout of timing-sensitive thread tests.
* 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>.
2011-04-22 16:59:05 +02: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
a0faf7ddf9 Fix bug #27450 ("Fat mutexes not GC'd until their owner dies").
* 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.
2009-09-15 23:05:24 +02:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Neil Jerram
21346c4f5e Remove possible deadlock in scm_join_thread_timed
* 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.
2009-05-27 22:43:24 +01:00
Neil Jerram
4201062de5 Fix wait-condition-variable so that it doesn't leave asyncs blocked
* 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.
2009-05-27 22:43:24 +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
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
Ludovic Courtès
2e77f7202b Changes from arch/CVS synchronization 2007-10-20 11:09:58 +00:00
Kevin Ryde
23f2b9a3de merge from 1.8 branch 2006-06-17 23:15:59 +00:00
Kevin Ryde
6e7d5622ee merge from 1.8 branch 2006-04-16 23:37:40 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
d8d925f310 Only test when 'threads are provided. 2005-03-02 20:55:17 +00:00
Kevin Ryde
5925aed0d6 New file, exercising parallel. 2003-06-19 01:41:20 +00:00