From matthew.lamari at gmail.com Sun Jun 1 05:01:18 2008 From: matthew.lamari at gmail.com (Matt Lamari) Date: Sun, 01 Jun 2008 00:01:18 -0500 Subject: [Bordeaux-threads-devel] Lispworks additions to Bordeaux - where to submit? Message-ID: <48422D1E.9060100@gmail.com> I have a lispworks.lisp for bordeaux in which I've added a few entries to bring it more into line with sbcl and cmucl's capabilities Most notable is condition variable support. Lispworks doesn't appear to support the same conditionals per se (probably why it wasn't trivially added to bordeaux) but its Lispworks wait seems to poll some predicate at some interval - I emulated conditions out of these. The condition variable basically stores a hashtable (containing only unnotified waiters known to be waiting) and a t-list for supporting queue ordering. Notification notifies only a SINGLE ELEMENT, as the docs claimed was desirable. I've included checks for some plausible cases where a process could leave the wait for reasons other than receiving the notification; but to ensure that an eligible waiter receives the next notification when it arrives. Unwind-protection ensures that the registered waiter is removed from the data structure, and that any unseen notification is passed on to the next waiter. Please let me know if this sounds to be on the right track, and how/to whom I should submit the change. From matt.lamari at gmail.com Sun Jun 1 05:23:32 2008 From: matt.lamari at gmail.com (Matthew Lamari) Date: Sun, 1 Jun 2008 00:23:32 -0500 Subject: [Bordeaux-threads-devel] Lispworks additions to Bordeaux - where do I submit? Message-ID: I have a lispworks.lisp for bordeaux in which I've added a few entries to bring it more into line with sbcl and cmucl's capabilities Most notable is condition variable support. Lispworks doesn't appear to support the same conditionals per se (probably why it wasn't trivially added to bordeaux) but its Lispworks wait seems to poll some predicate at some interval - I emulated conditions out of these. The condition variable basically stores a hashtable (containing only unnotified waiters known to be waiting) and a t-list for supporting queue ordering. Notification notifies only a SINGLE ELEMENT, as the docs claimed was desirable. I've included checks for some plausible cases where a process could leave the wait for reasons other than receiving the notification; but to ensure that an eligible waiter receives the next notification when it arrives. Unwind-protection ensures that the registered waiter is removed from the data structure, and that any unseen notification is passed on to the next waiter. Please let me know if this sounds to be on the right track, and how/to whom I should submit the change. -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at technomadic.org Mon Jun 2 15:28:33 2008 From: greg at technomadic.org (Greg Pfeil) Date: Mon, 02 Jun 2008 11:28:33 -0400 Subject: [Bordeaux-threads-devel] Lispworks additions to Bordeaux - where do I submit? In-Reply-To: References: Message-ID: <484411A1.8030606@technomadic.org> Matthew Lamari wrote: > > I have a lispworks.lisp for bordeaux in which I've added a few entries > to bring it more into line with sbcl and cmucl's capabilities > > Most notable is condition variable support. Lispworks doesn't appear to > support the same conditionals per se (probably why it wasn't trivially > added to bordeaux) but its Lispworks wait seems to poll some predicate > at some interval - I emulated conditions out of these. There is a portable implementation of condition variables included for implementations that don't support them directly. It's better (IMO) to use real condition vars where you can, but I'm curious if the portable ones weren't actually working. > The condition variable basically stores a hashtable (containing only > unnotified waiters known to be waiting) and a t-list for supporting > queue ordering. Notification notifies only a SINGLE ELEMENT, as the > docs claimed was desirable. I've included checks for some plausible > cases where a process could leave the wait for reasons other than > receiving the notification; but to ensure that an eligible waiter > receives the next notification when it arrives. Unwind-protection > ensures that the registered waiter is removed from the data structure, > and that any unseen notification is passed on to the next waiter. > > Please let me know if this sounds to be on the right track, and how/to > whom I should submit the change. This definitely sounds like the right track. The easiest way to submit the change would be to `darcs send` the patch to this list. Failing that, just attach the diff or whatever. From mmstud at gmail.com Sat Jun 7 13:18:49 2008 From: mmstud at gmail.com (Marko Tapio Manninen) Date: Sat, 7 Jun 2008 16:18:49 +0300 Subject: [Bordeaux-threads-devel] BORDEAUX-THREADS:WITH-TIMEOUT, LIFT:WITH-TIMEOUT symbol conflict Message-ID: <80F717A0-3D2F-4D0A-8078-5FDD9F5889B8@gmail.com> I thought this might interest, if it could be a cause of any problems in future: (sbcl.17 with threads on macbook 10.5.3) USE-PACKAGE # causes name-conflicts in # between the following symbols: BORDEAUX-THREADS:WITH-TIMEOUT, LIFT:WITH-TIMEOUT [Condition of type NAME-CONFLICT] See also: Common Lisp Hyperspec, 11.1.1.2.5 [:section] Restarts: 0: [RESOLVE-CONFLICT] Resolve conflict. 1: [TRY-RECOMPILING] Try recompiling bordeaux-threads-test 2: [RETRY] Retry performing # on #. 3: [ACCEPT] Continue, treating # on # as having been successful. 4: [ABORT] Return to SLIME's top level. 5: [TERMINATE-THREAD] Terminate this thread (#) Backtrace: 0: (NAME-CONFLICT # USE-PACKAGE #)[:EXTERNAL] 1: ((FLET SB-THREAD::WITH-RECURSIVE-SPINLOCK-THUNK)) 2: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE- SPINLOCK]555)) 3: (SB-THREAD::CALL-WITH-RECURSIVE-SPINLOCK # #S(SB- THREAD::SPINLOCK :NAME "Package Lock" :VALUE #)) 4: (USE-PACKAGE (# # #) #) 5: (SB-IMPL::UPDATE-PACKAGE # NIL NIL NIL NIL (# # #) NIL NIL NIL ("BORDEAUX-THREADS-TEST") NIL NIL) 6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SB-IMPL::%DEFPACKAGE "BORDEAUX- THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...) #) 7: ((FLET SB-C::DEFAULT-PROCESSOR) (SB-IMPL::%DEFPACKAGE "BORDEAUX- THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...)) 8: (SB-C::PROCESS-TOPLEVEL-FORM (SB-IMPL::%DEFPACKAGE "BORDEAUX- THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...) ((EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) (SB-IMPL:: %DEFPACKAGE "BORDEAUX-THREADS-TEST" # # # # ...)) SB-C::ORIGINAL- SOURCE-START 0 0) (:COMPILE-TOPLEVEL)) 9: (SB-C::PROCESS-TOPLEVEL-PROGN ((SB-IMPL::%DEFPACKAGE "BORDEAUX- THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...)) ((EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) (SB-IMPL:: %DEFPACKAGE "BORDEAUX-THREADS-TEST" # # # # ...)) SB-C::ORIGINAL- SOURCE-START 0 0) (:COMPILE-TOPLEVEL)) 10: (SB-C::PROCESS-TOPLEVEL-FORM (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD- TOPLEVEL :EXECUTE) (SB-IMPL::%DEFPACKAGE "BORDEAUX-THREADS- TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...)) (SB- C::ORIGINAL-SOURCE-START 0 0) NIL) 11: ((FLET SB-C::DEFAULT-PROCESSOR) (DEFPACKAGE BORDEAUX-THREADS- TEST (:USE #:CL #:BORDEAUX-THREADS #:LIFT))) 12: (SB-C::PROCESS-TOPLEVEL-FORM (DEFPACKAGE BORDEAUX-THREADS-TEST (:USE #:CL #:BORDEAUX-THREADS #:LIFT)) (SB-C::ORIGINAL-SOURCE-START 0 0) NIL) 13: (SB-C::SUB-SUB-COMPILE-FILE #) 14: ((LAMBDA NIL)) 15: (SB-C::%WITH-COMPILATION-UNIT #) [:EXTERNAL] 16: (SB-C::SUB-COMPILE-FILE #) 17: (COMPILE-FILE #P"/Users/mmstud/lisp/libs/bordeaux-threads/test/ bordeaux-threads-test.lisp")[:EXTERNAL] 18: ((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:COMPILE-OP ASDF:CL- SOURCE-FILE)) # # # #) 19: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # #) 20: ((SB-PCL::FAST-METHOD ASDF:PERFORM :AROUND (ASDF:COMPILE-OP ASDF:CL-SOURCE-FILE)) # #S(SB-PCL::FAST-METHOD- CALL :FUNCTION # :PV NIL :NEXT-METHOD- CALL NIL :ARG-INFO (2)) # #) 21: ((LAMBDA NIL)) 22: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK)) 23: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]522)) 24: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK # #S(SB-THREAD:MUTEX :NAME "big compiler lock" :%OWNER # :LUTEX #)) 25: (SB-C::%WITH-COMPILATION-UNIT #) [:EXTERNAL] 26: (ASDF:OPERATE ASDF:LOAD-OP :BORDEAUX-THREADS-TEST)[:EXTERNAL] 27: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF:OOS (QUOTE ASDF:LOAD- OP) :BORDEAUX-THREADS-TEST) #) 28: (SWANK::EVAL-REGION "(asdf:oos 'asdf:load-op :bordeaux-threads- test) ") 29: ((LAMBDA NIL)) From gwking at metabang.com Sat Jun 7 23:38:54 2008 From: gwking at metabang.com (Gary King) Date: Sat, 7 Jun 2008 19:38:54 -0400 Subject: [Bordeaux-threads-devel] Re: [lift-devel] BORDEAUX-THREADS:WITH-TIMEOUT, LIFT:WITH-TIMEOUT symbol conflict In-Reply-To: <80F717A0-3D2F-4D0A-8078-5FDD9F5889B8@gmail.com> References: <80F717A0-3D2F-4D0A-8078-5FDD9F5889B8@gmail.com> Message-ID: <4447068F-E46B-43EB-8416-9655956DE811@metabang.com> Hi again Marko, I just send a patch to Greg Pfeil. The defpackage in the testsuite needs a shadowing-import-from to specific which with-timeout to use. thanks again for the report, On Jun 7, 2008, at 9:18 AM, Marko Tapio Manninen wrote: > I thought this might interest, if it could be a cause of any > problems in future: (sbcl.17 with threads on macbook 10.5.3) > > USE-PACKAGE # causes name-conflicts > in # between the following > symbols: > BORDEAUX-THREADS:WITH-TIMEOUT, LIFT:WITH-TIMEOUT > [Condition of type NAME-CONFLICT] > See also: > Common Lisp Hyperspec, 11.1.1.2.5 [:section] > > Restarts: > 0: [RESOLVE-CONFLICT] Resolve conflict. > 1: [TRY-RECOMPILING] Try recompiling bordeaux-threads-test > 2: [RETRY] Retry performing # on > #. > 3: [ACCEPT] Continue, treating # on > # as having > been successful. > 4: [ABORT] Return to SLIME's top level. > 5: [TERMINATE-THREAD] Terminate this thread (# thread" {1268F779}>) > > Backtrace: > 0: (NAME-CONFLICT # USE-PACKAGE > #)[:EXTERNAL] > 1: ((FLET SB-THREAD::WITH-RECURSIVE-SPINLOCK-THUNK)) > 2: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE- > SPINLOCK]555)) > 3: (SB-THREAD::CALL-WITH-RECURSIVE-SPINLOCK # THREAD::WITH-RECURSIVE-SPINLOCK-THUNK) {44FEE0D}> #S(SB- > THREAD::SPINLOCK :NAME "Package Lock" :VALUE # "repl-thread" {1268F779}>)) > 4: (USE-PACKAGE (# # THREADS"> #) #) > 5: (SB-IMPL::UPDATE-PACKAGE # NIL > NIL NIL NIL (# # > #) NIL NIL NIL ("BORDEAUX-THREADS-TEST") NIL NIL) > 6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SB-IMPL::%DEFPACKAGE "BORDEAUX- > THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...) > #) > 7: ((FLET SB-C::DEFAULT-PROCESSOR) (SB-IMPL::%DEFPACKAGE "BORDEAUX- > THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...)) > 8: (SB-C::PROCESS-TOPLEVEL-FORM (SB-IMPL::%DEFPACKAGE "BORDEAUX- > THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...) > ((EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) (SB-IMPL:: > %DEFPACKAGE "BORDEAUX-THREADS-TEST" # # # # ...)) SB-C::ORIGINAL- > SOURCE-START 0 0) (:COMPILE-TOPLEVEL)) > 9: (SB-C::PROCESS-TOPLEVEL-PROGN ((SB-IMPL::%DEFPACKAGE "BORDEAUX- > THREADS-TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...)) > ((EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) (SB-IMPL:: > %DEFPACKAGE "BORDEAUX-THREADS-TEST" # # # # ...)) SB-C::ORIGINAL- > SOURCE-START 0 0) (:COMPILE-TOPLEVEL)) > 10: (SB-C::PROCESS-TOPLEVEL-FORM (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD- > TOPLEVEL :EXECUTE) (SB-IMPL::%DEFPACKAGE "BORDEAUX-THREADS- > TEST" (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) (QUOTE NIL) ...)) (SB- > C::ORIGINAL-SOURCE-START 0 0) NIL) > 11: ((FLET SB-C::DEFAULT-PROCESSOR) (DEFPACKAGE BORDEAUX-THREADS- > TEST (:USE #:CL #:BORDEAUX-THREADS #:LIFT))) > 12: (SB-C::PROCESS-TOPLEVEL-FORM (DEFPACKAGE BORDEAUX-THREADS-TEST > (:USE #:CL #:BORDEAUX-THREADS #:LIFT)) (SB-C::ORIGINAL-SOURCE-START > 0 0) NIL) > 13: (SB-C::SUB-SUB-COMPILE-FILE #) > 14: ((LAMBDA NIL)) > 15: (SB-C::%WITH-COMPILATION-UNIT #) > [:EXTERNAL] > 16: (SB-C::SUB-COMPILE-FILE #) > 17: (COMPILE-FILE #P"/Users/mmstud/lisp/libs/bordeaux-threads/test/ > bordeaux-threads-test.lisp")[:EXTERNAL] > 18: ((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:COMPILE-OP ASDF:CL- > SOURCE-FILE)) # # > # # threads-test" {13197A09}>) > 19: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. > SB-PCL::.ARG1.)) # # > # # threads-test" {13197A09}>) > 20: ((SB-PCL::FAST-METHOD ASDF:PERFORM :AROUND (ASDF:COMPILE-OP > ASDF:CL-SOURCE-FILE)) # #S(SB-PCL::FAST-METHOD- > CALL :FUNCTION # :PV NIL :NEXT-METHOD- > CALL NIL :ARG-INFO (2)) # # SOURCE-FILE "bordeaux-threads-test" {13197A09}>) > 21: ((LAMBDA NIL)) > 22: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK)) > 23: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-RECURSIVE-LOCK]522)) > 24: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK # THREAD::WITH-RECURSIVE-LOCK-THUNK) {44FF6CD}> #S(SB- > THREAD:MUTEX :NAME "big compiler lock" :%OWNER # "repl-thread" {1268F779}> :LUTEX # widetag=#x5E {1049A027}>)) > 25: (SB-C::%WITH-COMPILATION-UNIT #) > [:EXTERNAL] > 26: (ASDF:OPERATE ASDF:LOAD-OP :BORDEAUX-THREADS-TEST)[:EXTERNAL] > 27: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF:OOS (QUOTE ASDF:LOAD- > OP) :BORDEAUX-THREADS-TEST) #) > 28: (SWANK::EVAL-REGION "(asdf:oos 'asdf:load-op :bordeaux-threads- > test) > ") > 29: ((LAMBDA NIL)) > _______________________________________________ > lift-devel mailing list > lift-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/lift-devel -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM