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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user