cxxxr / jsonrpc

JSON-RPC 2.0 server/client for Common Lisp.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

notify from other thread

cxxxr opened this issue · comments

commented

for example

(jsonrpc:expose *server*                                                                                  
                method                                                                                    
                (lambda (params)
                  (bt:make-thread                                                                          
                   (lambda ()                                     
                     (jsonrpc:notify-async *server*                                                       
                                           "window/logMessage"                                             
                                           ...)))               
                  nil))

in this case *connection* is unbound in jsonrpc/class:notify-async

Thank you for reporting.

Well, specifying :initial-bindings `((*connection* . ,*connection*)) to bt:make-thread would work.
However, *connection* should be an internal symbol and users should never be concerned with it.

I guess that binding *default-special-bindings* for that case would be great.