Can't print a waitqueue object when *print-circle* is nil

Bug #627199 reported by Faré
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Douglas Katzman

Bug Description

When *print-circle* is T, a typical waitqueue shows as such:
#4=#S(SB-THREAD:WAITQUEUE :NAME NIL :TOKEN #4#)

This won't print using the default value of *print-circle* which is nil.

Instead of forcing unsuspecting users of portable threading libraries to bind *print-circle* to t, shouldn't SBCL have a defmethod print-object that handles this object gracefully independently from the value of *print-circle*?

I admit I don't understand the underlying code and can't send a patch more clever than binding *print-circle* in a print-unreadable-object.

Note: using SBCL 1.0.41 on linux amd64.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

Binding *PRINT-CIRCLE* there sounds about right.

Changed in sbcl:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
James Y Knight (foom) wrote :

Hum, why does it even do
(setf (waitqueue-token queue) queue)
in condition-notify, instead of just nil? Isn't anything other than a value of *current-thread* an equivalent value to set there?

Revision history for this message
Douglas Katzman (dougk) wrote :

waitqueues now just print their name (and they don't set the token to the thread either)

Changed in sbcl:
assignee: nobody → Douglas Katzman (dougk)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.