[Ecls-list] Threading as default feature
Bruce-Robert Fenn Pocock
brpocock at star-hope.org
Wed Jun 12 12:55:19 UTC 2013
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 at 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
> (mp:process-run-function
> "test"
> (lambda ()
> (loop
> (mp:wait-on-semaphore to-workers)
> (mp:signal-semaphore from-workers)))))
> (loop
> (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 ".")
> (finish-output))))
>
> (defun run ()
> (test 10000 64))
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20130612/1e1f5c3c/attachment.html>
More information about the ecl-devel
mailing list