[Ecls-list] Threads on MacOSX (and others)
Juan Jose Garcia Ripoll
lisp at arrakis.es
Wed Jan 26 08:21:07 UTC 2005
bernard tatin wrote:
> I have made very few tests. I am trying to do one consistent. If you
> already have somthing which can test threads, I wil be glad to try it.
> Sometimes my english is poor, what I mean is a hard test which can
> prove that threads and locks works fine.
I do not have a hard test, but a simple one is to launch a thread and
tell it to stop. See the example below.
Further testing is definitely required, not only for the MacOSX port,
but for all ports which support threads. There might be yet some race
conditions around. For instance in the reader.
------------
ECL (Embeddable Common-Lisp) 0.9e
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help. Top level.
> (mp::process-run-function 'test
#'(lambda ()
(loop (sleep 3)
(princ "Thread awaken... and going to sleep")
(terpri)
)))
#<process 081b7820>
Thread awaken... and going to sleep
Thread awaken... and going to sleep
Thread awaken... and going to sleep
Thread awaken... and going to sleep
Thread awaken... and going to sleep
Thread awaken... and going to sleep
[... more lines ommited ...]
> (mp::process-kill *)
T
More information about the ecl-devel
mailing list