-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
The documentation states that the Mailbox is a first-in-first-out queue, but in reality, it is last-in-first-out.
CL-USER> (lisp-implementation-version)
"1.8.0"
"Java_HotSpot(TM)_64-Bit_Server_VM-Oracle_Corporation-1.8.0_181-b13"
"amd64-Windows_10-10.0"
CL-USER> (setf *mailbox* (threads:make-mailbox))
#S(EXTENSIONS:MAILBOX :QUEUE NIL)
CL-USER> (documentation (type-of *mailbox*) 'type)
"A first-in-first out queue of messages"
CL-USER> (threads:mailbox-send *mailbox* 100)
NIL
CL-USER> *mailbox*
#S(EXTENSIONS:MAILBOX :QUEUE (100))
CL-USER> (threads:mailbox-send *mailbox* 200)
NIL
CL-USER> *mailbox*
#S(EXTENSIONS:MAILBOX :QUEUE (200 100))
CL-USER> (threads:mailbox-read *mailbox*)
200
CL-USER> *mailbox*
#S(EXTENSIONS:MAILBOX :QUEUE (100))
CL-USER>
Metadata
Metadata
Assignees
Labels
No labels