when constructing SEARCH message, include time in the message as well. This will enable us to ignore any messages when we have a 'later' state available.

This commit is contained in:
2025-09-07 13:24:41 +01:00
parent 89c4e85c98
commit f3c1905c0c
6 changed files with 17 additions and 17 deletions

View File

@@ -5,7 +5,7 @@ struct
(* Prerequisite to sending message: move buffer to end. *)
fun loop (searchMailbox, inputMailbox) =
let
val (buffer, searchString) = Mailbox.recv searchMailbox
val (buffer, searchString, time) = Mailbox.recv searchMailbox
val searchList = SearchList.build (buffer, searchString)
val () = Mailbox.send (inputMailbox, InputMsg.WITH_SEARCH_LIST searchList)
in

View File

@@ -7,8 +7,8 @@ struct
fun sendMsg (msg, drawMailbox, searchMailbox) =
case msg of
DRAW msg => Mailbox.send (drawMailbox, msg)
| SEARCH (buffer, searchString) =>
Mailbox.send (searchMailbox, (buffer, searchString))
| SEARCH (buffer, searchString, time) =>
Mailbox.send (searchMailbox, (buffer, searchString, time))
fun sendMsgs (msgList, drawMailbox, searchMailbox) =
case msgList of