Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLACKBIRD::PROMISE-VALUES is Undefined in LWM 7.1 #4

Open
dbmcclain opened this issue Oct 23, 2020 · 0 comments
Open

BLACKBIRD::PROMISE-VALUES is Undefined in LWM 7.1 #4

dbmcclain opened this issue Oct 23, 2020 · 0 comments

Comments

@dbmcclain
Copy link

dbmcclain commented Oct 23, 2020

On QuickLoad of :GREEN-THREADS in LWM 7.1, I end up with the result:

CL-USER 2 > (ql:quickload :green-threads)
To load "green-threads":
Load 1 ASDF system:
green-threads
; Loading "green-threads"
[package blackbird-base]..........................
[package blackbird-syntax]........................
[package blackbird-util]..........................
[package blackbird]...............................
[package cl-async-future].........................
[package green-threads]..

The following function is undefined:
BLACKBIRD::PROMISE-VALUES which is referenced by GREEN-THREADS:FUTURE-VALUES

Looks like either:
(A) PROMISE-VALUES needs to be exported by BLACKBIRD-BASE and BLACKBIRD (and hence, CL-ASYNC), or else
(B) One should not be referencing an internal symbol from BLACKBIRD in GREEN-THREADS:FUTURE-VALUES.

I can't tell which of these alternatives is the correct one. From browsing the Blackbird docs, there is never any mention of directly referencing the PROMISE-VALUES, which leads me to think there are alternative ways of getting a promise value.

And from reviewing the Green-Threads docs, there doesn't seem to be a case presented where the need for FUTURE-VALUES is manifest.

I'm just getting started perusing the sources to make sense of all of this stuff.

So the issue seems to be that:

  1. PROMISE-VALUES is an internal accessor function defined in BLACKBIRD-BASE, not exported
  2. Package BLACKBIRD uses BLACKBIRD-BASE, and does not gain access to the internal symbols of BLACKBIRD-BASE
  3. Hence no internal symbol BLACKBIRD::PROMISE-VALUES

So, since GREEN-THREADS is the client referring to BLACKBIRD internal symbols, the corrected form for GT:FUTURE-VALUES is:

(defun future-values (future)
"Returns the values given to the future when it
was completed."
(values-list (blackbird-base::promise-values future)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant