freenode/#stumpwm - IRC Chatlog
Search
18:51:23
krwq
hey, is there some macro to run command from a different thread so that all dynamic bindings are still set? I'm specifically trying to run a thread which checks if an app is still running and once it dies to quit stumpwm
18:52:08
krwq
when I run the command directly it will do it but when run in a thread Im hitting some weird issues which I think are due to variables not being set in a thread
21:51:08
PuercoPop
krwq: It may be related to how special variables work in the context of threads. If you show us the code we may be able to help you debugging it. http://sbcl.org/manual/index.html#Special-Variables. That said, run-with-timer may be what you are looking for
22:02:34
krwq
PuercoPop: i.e. https://pastebin.com/N8GXZ1Ae + bt:make-thread which calls quit-if-ff-not-running in a loop with some timeout
22:03:36
krwq
PuercoPop: I can see timer might help and I could potentially add some kind of task queue processing with some helper macro to schedule it on the right thread
22:04:15
krwq
PuercoPop: but I feel it would be easier if this was provided by stumpwm like i.e. (with-stumpwm ...) or something along this lines which would rebind the variables on the thread
22:36:23
PuercoPop
krwq: run-with-timer does what you ask iiuc. It schedules a function to be called in the main thread
22:37:50
PuercoPop
(the proper implementation of window list should also 'mappend' all the windows from all the screens
2:24:46
loke
PuercoPop: Thanks, do you happen to have any idea what could be wrong? I'm quite confused.