[Openmcl-devel] threads and special variables

bryan o'connor bryan-openmcl at lunch.org
Thu Jan 13 00:54:40 UTC 2005


> (process-run-function
>    (list :name "test" :initial-bindings '((*var* . 1)(*param* . 2)))
>     #'test)

sigh.. now i see i was stupidly double-quoting.

(process-run-function
    '(:name "test" :initial-bindings '((*var* . 1)(*param* . 2)))
     #'test)

regardless, i imagined it working like this:

(my-process-run-function #'test nil :name "test" :initial-bindings 
'((*var* . 1) (*param* . 2)))

and implemented like this:

(defun my-process-run-function (function args
                                 &key (name "Anonymous")
                                 (priority  0)
                                 (stack-size 
*default-control-stack-size*)
                                 (vstack-size *default-value-stack-size*)
                                 (tstack-size *default-temp-stack-size*)
                                 (initial-bindings ())
                                 (persistent nil)
                                 (use-standard-initial-bindings t))
   (setq priority (require-type priority 'fixnum))
   (let* ((process (make-process name
                                 :priority priority
                                 :stack-size stack-size
                                 :vstack-size vstack-size
                                 :tstack-size tstack-size
                                 :persistent persistent
                                 :use-standard-initial-bindings 
use-standard-initial-bindings
                                 :initial-bindings initial-bindings)))
     (process-preset process #'(lambda () (apply function args)))
     (process-enable process)
     process))




More information about the Openmcl-devel mailing list