I have a function, called update-r, that I want to run frequently and automatically. I understand that CMUCL threads are user-level, which is fine, but I can't seem to figure out how to get them to work at all. Initially, a call to mp:all-processes shows only a process called "Process Initial". I next tried calling mp:make-process, and I get back a process object, but the process does not show up in mp:all-processes. Should it? Do I have to add it somehow? I tried looking at all the external symbols in the mp package, but nothing seemed relevant. The created processed state is :active, it's %run-reasons are (:enable) and it's %arrest-reasons are nil.
I also tried using a previous suggestion, which was to add #+mp (mp::startup-idle-and-top-level-loops) to my .cmucl-init. If I do this, I get two processes, a Process Top Level Loop, and a Process Idle Loop, but again, mp:make-process doesn't seem to change the results of mp:all-processes. (Side notes: I do not really understand the mechanics of using startup-idle-and-top-level-loops. If I call it in my .cmucl-init, it seems to abort somewhere --- nothing in the init file after it runs, and I get an "evaluation aborted" message from slime. If I run it in the REPL after starting up CMUCL, it hangs indefinitely.) I'm pretty lost here. What I'd like to achieve is that update-r gets called automatically during interactive use (I realize that the user-level threading implies that it won't get called while functions are running unless they yield) in the REPL. Any advice is appreciated. Note that I am using slime with the :fd-handler communication-style, if that's relevant. Cheers, rif
