I'm all for not DISabling it, but if there are known bugs like this, emitting some descriptive warnings at compile time might be very helpful … [part-time ECL user perspective]

On Jun 12, 2013 1:17 AM, "James M. Lawrence" <llmjjmll@gmail.com> wrote:
Threading in ECL still seems experimental because it fails some basic
stress tests. I tend to classify thread problems as rather bad because
the door is opened to corruption. Doesn't enabling it by default
communicate the wrong message?

Probably simplest stress test that currently fails is in the last
comment at http://sourceforge.net/p/ecls/bugs/192/

(defun test (message-count thread-count)
  (let ((to-workers (mp:make-semaphore))
        (from-workers (mp:make-semaphore)))
    (loop :repeat thread-count :do
        (lambda ()
             (mp:wait-on-semaphore to-workers)
             (mp:signal-semaphore from-workers)))))
       (loop :repeat message-count :do
          (mp:signal-semaphore to-workers))
       (loop :repeat message-count :do
          (mp:wait-on-semaphore from-workers))
       (assert (zerop (mp:semaphore-count to-workers)))
       (assert (zerop (mp:semaphore-count from-workers)))
       (format t ".")

(defun run ()
  (test 10000 64))

This SF.net email is sponsored by Windows:

Build for Windows Store.

Ecls-list mailing list