rename 'UpdateThread' structure to 'Updater', because it is no longer a separate thread

This commit is contained in:
2025-09-10 01:44:25 +01:00
parent 6961a76471
commit 95a07bcd92
3 changed files with 3 additions and 4 deletions

30
shell/updater.sml Normal file
View File

@@ -0,0 +1,30 @@
structure Updater =
struct
open MailboxType
open InputMsg
fun sendMsg msg =
case msg of
DRAW msg => DrawMailbox.append msg
| SEARCH (buffer, searchString, time) =>
Mailbox.send (SearchMailbox.mailbox, (buffer, searchString, time))
fun sendMsgs msgList =
case msgList of
hd :: tl => let val () = sendMsg hd in sendMsgs tl end
| [] => ()
fun update (app: AppType.app_type, inputMsg) =
let
val time = Time.now ()
val () = ExceptionLogger.addCommand inputMsg
val app = AppUpdate.update (app, inputMsg, time)
handle e => ExceptionLogger.log e
val () = sendMsgs (#msgs app)
in
app
end
end