Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8365515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:40:45+00:00 2026-06-09T12:40:45+00:00

This may be a stupid question, or at least one with some incorrect assumptions

  • 0

This may be a stupid question, or at least one with some incorrect assumptions about the actors model, but perhaps someone could educate me. Suppose I set up an example actor similar to one found in the cl-actors example documentation

cl-user> (ql:quickload :cl-actors)
:CL-ACTORS

cl-user> (use-package :cl-actors)
T

cl-user> (defactor echo (stream) (message) 
           (format stream "~a~%" message)
           next)
ECHO

cl-user> (defparameter e (echo :stream *standard-output*))
E

cl-user> (send e "Test message")
Test Message
; No value

Why is there ; No value there instead of NIL? Is there a way to get the returned value out without killing the actor thread with(bt:join-thread (cl-actors::get-thread e)) (which I suspect wouldn’t exactly do what I want in any case)? I’m specifically looking to get the return value, and not play tricks with with-output-to-string or similar.

The more general problem I’m trying to solve, in case you care, is trying to output information from an actor into a cl-who page for the client side. Something along the lines of

(with-html-output (s)
   (:h1 (send e "Test message")))

which clearly won’t work if send doesn’t return anything. Pointers on the more general problem are welcome if the specific question actually proves to be stupid.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:40:47+00:00Added an answer on June 9, 2026 at 12:40 pm

    I ended up changing cl-actors slightly and adding a send-receive construct that does what I want in this situation. The modified code is here (comments encouraged). The core is this:

    (defmethod send-receive ((self actor) message &optional (timeout 0))
      (let ((tmp (make-queue)))
        (send self tmp message)
        (car (dequeue tmp timeout))))
    

    Essentially, we declare a temporary queue, send a message with that queue as a receiver, then try to pop a value off it with an optional timeout (0 means wait forever). This depends on the target actor accepting a sender parameter, which seems like a sufficiently actorsy way to go about it..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a stupid question but one that is throwing me for a
This may be a stupid question for some of you but I need to
Evening guys, This may seem like a stupid question but im having some issues
This may be a stupid question but how does one actually run the 'Build'
This may be a stupid question but I'm curious to hear opinions about converting
This may be a stupid question but I have a code with the following
This may be a stupid question, but I'm trying to replicate a customer's OpenLDAP
This may be a stupid question, but I have to ask! I have the
This may be a stupid question but im just starting to learn Rail thats
this may be a stupid question but when I add a reference to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.