mdbergmann / cl-gserver

Sento - Actor framework featuring actors and agents for easy access to state and asynchronous operations.

Home Page:https://mdbergmann.github.io/cl-gserver/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ask-s with timeout fails on ABCL

mdbergmann opened this issue · comments


ASK-S--SHARED--TIMEOUT in ACTOR-TESTS [Tests for ask-s timeout.]:
Unexpected Error: #<SIMPLE-ERROR {63800EA7}>
Attempt to release lock not held by calling thread..

I put the new version of "cl-gserver" on the local-projects, and
(ql:quickload "cl-gserver")
got,
; Loading "cl-gserver" [package cl-gserver.router] #<THREAD "interpreter" {59132E91}>: Debugger invoked on condition of type READER-ERROR The package "BT2" can't be found.

Odd.
'BT2' is part of Bordeaux-Threads.
Can you check what is the version of your quicklisp distribution?

Or from a fresh REPL try:

(ql:quickload :bordeaux-threads)
;; and then
(bt2:all-threads)

(ql:update-dist "quicklisp") You already have the latest version of "quicklisp": 2021-05-31. NIL

(ql:update-client) The most up-to-date client, version 2021-02-13, is already installed. T
using "Clozure Common Lisp Version 1.12 DarwinX8664"
(ql:quickload :bordeaux-threads)
and
`? (bt2:all-threads)

Error: There is no package named "BT2" .`

It appears that the version in quicklisp doesn't contain the the 'api2' (package bt2) version.
On my system asdf loads it from the 'local-projects'.
So I guess then I have to either drop ABCL or manually move the atomics stuff from bt2 to my code base. Need to think about it for a bit...

Yes. I put the latest the verison of "bordeaux-threads" in my 'local-projects', and
? (bt2:all-threads) (#<THREAD "listener" #x30200132688D> #<THREAD "Initial" #x30200132627D>)
I can quickload "cl-gserver" without problem in CCL and ABCL.

I use 'Erlangen' in CCL. But CCL doesn't support apple m1 well now, and no schedule for m1.
So I want to rewrite 'erlangen' into more "universal" version. Then I find this package.
"cl-gserver"(previous version) works well in CCL, SBCL, and Lispworks from my testing.

I am looking forward to your next version.

With 'previous version' you mean the one that doesn't use 'bt2'?

Do you have special need for ABCL?

I've reverted to atomics package for now which breaks ABCL.
I'll think about something here. Shouldn't be too complicated to use some atomic-integer for ABCL.
Eventually this is only used for the round-robin router strategy. The random strategy doesn't need this.

I haven't test the latest version.
I don't haver special need for ABCL. Sometimes I think in the future the risc-v will be popular, and
I am not sure SBCL would work on risc-v at the first time. But there must be JVM, so ABCL must work.
This is just my imagination. SBCL develops quickly. There is almost no risc-v boards in the markets.
So a fancy story.

So, found a way to have atomics back in for ABCL. This should work now. I don't like it much with those #-abcl sprincled around. So I will refactor this quite soon. But it works.

Remains the original issue with ask-s and timeout.

When RISC-V will get any popularity then there will most likely a port for SBCL.

This test passes now with the last changes on timeouts.