Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/courier.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ NOTES:

Defines an implicit NIL block from which the user can RETURN."
(assert (zerop timeout) () "Blocking RECEIVE-MESSAGE not currently supported. Consider SYNC-RECEIVE for PROCESS instances.")
(when catch-RTS?
(when (and catch-RTS?
(not (member 'message-RTS clauses :key #'car)))
(setf clauses (append clauses `((message-RTS (error "Got an RTS."))))))
(a:with-gensyms (block-name inbox x)
(a:once-only (address)
Expand Down
3 changes: 2 additions & 1 deletion src/process/dpu-helpers.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ NOTE: `MESSAGE-RTS' replies must be explicitly handled. Otherwise, the default
(multiple-value-bind (,retval ,sr-done?)
;; NOTE: this is implemented inefficiently. we could maintain an end-of-queue
;; pointer across successive unsuccessful receive attempts.
(receive-message (,sync-channel ,sync-message-place)
(receive-message (,sync-channel ,sync-message-place
:catch-rts? ,(null (member 'message-rts sync-clauses :key #'car)))
,@(loop :for (clause-head . clause-body) :in sync-clauses
:collect `(,clause-head
(a:when-let ((,record (process-debug? ,process-name)))
Expand Down
17 changes: 6 additions & 11 deletions src/process/rpc.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,12 @@ If `RETURNED?' is supplied and this call generates a `MESSAGE-RTS' reply, then `
(sync-receive (,listen-channel ,message-place)
,@(unless (null returned?)
`((message-RTS
,(etypecase result-place-or-list
(symbol
`(lax-destructuring-bind
,result-place-or-list
nil
,@(body t)))
(list
`(lax-destructuring-bind
,result-place-or-list
(list ,@(mapcar (constantly nil) result-place-or-list))
,@(body t)))))))
(lax-destructuring-bind
,result-place-or-list
,(etypecase result-place-or-list
(symbol 'nil)
(list `(list ,@(mapcar (constantly nil) result-place-or-list))))
,@(body t)))))
(,message-type
(lax-destructuring-bind
,result-place-or-list
Expand Down