Ticket #450 (closed defect: invalid)

Opened 5 years ago

Last modified 5 years ago

special keywords passed through process-run-function

Reported by: S11001001 Owned by: gb
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:

Description

Seen as

cl-user> (ccl:process-run-function "Anon" (lambda (&rest args) (print args))
                                   :use-standard-initial-bindings nil)
-| (:use-standard-initial-bindings nil)

It would be nice if these arguments were removed, or as the manual seems to imply, the args weren't passed through to function at all.

Change History

comment:1 Changed 5 years ago by S11001001

This was found in r11882.

comment:2 Changed 5 years ago by gb

  • Status changed from new to assigned

I'm not sure if there's an example in the documentation that suggests otherwise, but one would create a process and run a function that didn't use the standard initial bindings and printed its arguments via:

(process-run-function '(:name "Anon" :use-standard-initial-bindings nil)
                       (lambda (&rest args) (print args))) ; hope there are enough close parens here

PROCESS-RUN-FUNCTION's first argument should be either a list of keyword/value pairs (passed to MAKE-PROCESS) or an atom (usually a string);

(process-run-function "name" ...)

is shorthand for:

(process-run-function '(:name "name") ...)

Any forms to the right of the function are just evaluated normally and their values are just passed as arguments to the process's initial function; those values don't affect process creation or startup options.

I think that your example behaves as it should (but perhaps not as you expected); unless there's a documentation bug that led to that expectation, I don't see a bug here.

comment:3 Changed 5 years ago by S11001001

  • Status changed from assigned to closed
  • Resolution set to invalid

Ah yes, I see that now that I look at %process-run-function more closely; I merely assume that Bordeaux-Threads used the function correctly.

Note: See TracTickets for help on using tickets.