add new snippet 'snippets/toast' (like android 'Toast')

This commit is contained in:
pls.153 2023-03-15 08:34:54 +01:00
parent 61831ba362
commit a58948b9d0
6 changed files with 99 additions and 20 deletions

View file

@ -1 +1,19 @@
(load "lisp/main.lisp")
(in-package :qml-user)
(defun request ()
"Runs request in a thread, returns after thread finished."
(q> |playing| "busy" t) ; start animation
(let (response)
;; worker thread
(mp:process-run-function
:request
(lambda ()
(sleep 3) ; working hard...
(setf response :ok)
(qexit)))
;; main thread
(qexec (* 60 1000)) ; timeout (ms)
(q> |playing| "busy" nil) ; stop animation
response))
(qsingle-shot 1000 'request)