Re: ABCL Threads

Marco Antoniotti <[email protected]>
Newsgroups gmane.editors.j.devel
Message-ID <CAG0Nw2nMhxdVK1mO3XuG8CDkbQjfU9DSxOAd5J-Vtkze5v2kMA@mail.gmail.com>
Hi everybody.

I made quite a bit of progress with THREADS in ABCL.  I had some snags, but
I think I got the hang of it (having written a lot of Java before the year
2000 and having taught it, helped).

I have a question about REGISTER-JAVA-EXCEPTION.  Two things.


   1. I read (mostly) the - 20 y.o. - thread at
   https://sourceforge.net/p/armedbear-j/mailman/armedbear-j-devel/thread/Pine.LNX.4.60.0510301322110.5998%40csusza.math.bme.hu/
   and I think I understand how to proceed.
   2. The REGISTER-JAVA-EXCEPTION doc string seems inconsistent with the
   above thread: "Registers the Java Throwable named by the *symbol*
   EXCEPTION-NAME as the condition designated by CONDITION-SYMBOL.  Returns T
   if successful, NIL if not." Symbol does not seem right.


I need to register java.util.concurrent.TimeoutException for my needs (and
your :) ), am I correct to go ahead and do

(define-condition timeout-exception (java-exception) ())
(java:register-java-exception "java.util.concurrent.TimeoutException"
'timeout-exception)

?

After that I will have other questions.

Thanks.

Marco



On Mon, Aug 10, 2026 at 6:29 PM Marco Antoniotti <[email protected]>
wrote:

> Thanks Dave, but I am on a different quest 🥹
>
> Having said that, what is the interaction between threads (read: the
> function running in a thread) and special variables?  It appears that they
> become thread local, is that so?  The documentation is very sparse.
>
> Thanks
>
> MA
>
> On Wed, Aug 5, 2026 at 7:13 PM David Cooper <[email protected]>
> wrote:
>
>>
>> Hi Marco,
>>
>> I don't have experience specifically with threads on abcl yet, but
>> regarding abcl in general, I took on maintenance of the
>> gitlab.common-lisp.net/cl-docker-images/
>> <http://gitlab.common-lisp.net/cl-docker-images/abcl/> container image
>> builds and recently got the abcl/ pipelines running green.  So any feedback
>> on those built docker container images (from Marco or anyone on this list)
>> would be welcomed.
>>
>> Also I just joined #abcl on libera.chat myself, I'm not sure your handle
>> on there to know whether you're one of the ~8 apparent members in that
>> channel. Anyway, that is a place where you and I (and anyone else
>> interestedd) could brainstorm any ideas or share any quirks regarding those
>> abcl docker images, maybe before they need to get promoted to Issues or MRs
>> in the project.
>>
>> Of course we can also discuss threads in there. I would hope bt2 would
>> have most needs covered - diving into Java internals sounds scary, to me at
>> least.
>>
>>
>> Thanks,
>>
>> Dave Cooper
>>
>>
>>
>>
>>
>> From: Marco Antoniotti <[email protected]>
>> To: "Rudi Schlatte"<[email protected]>
>> Cc: <[email protected]>
>> Date: Wed, 05 Aug 2026 05:20:06 -0400
>> Subject: Re: ABCL Threads
>>
>> Thanks
>>
>> Yep, I gathered that much.  I also saw a note in the documentation saying
>> that you can use JSS to use java.util.concurrent.  Can you point me to some
>> examples for that?
>>
>> Thanks
>>
>> Marco
>>
>> On Wed, Aug 5, 2026 at 11:44 AM Rudi Schlatte <[email protected]> wrote:
>>
>>
>>
>> --
>> Marco Antoniotti, Professor, Director         tel. +39 - 02 64 48 79 01
>>
>>
>>
>> > On 5 Aug 2026, at 09:57, Marco Antoniotti <[email protected]>
>> wrote:
>> >
>> > Hi
>> >
>> > It has been too long since I dabbled in Java, but I am working on some
>> threading code for ABCL.
>> >
>> > What would be a good implementation for BARRIERs in ABCL?
>>
>> Hi, if I don’t misunderstand the question, a barrier can be implemented
>> using the Java class java.util.concurrent.CountDownLatch.
>>
>> (I’m not on irc these days except dropping in for a few minutes every
>> other month..)
>>
>> Best,
>>
>> Rudi
>>
>>
>>
>>
>
> --
> Marco Antoniotti
>


-- 
Marco Antoniotti
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.