mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 10:31:34 -08:00
add new snippet 'snippets/toast' (like android 'Toast')
This commit is contained in:
parent
61831ba362
commit
a58948b9d0
6 changed files with 99 additions and 20 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue