2025-08-07 12:20:57 +01:00
|
|
|
structure SearchThread =
|
|
|
|
|
struct
|
|
|
|
|
open CML
|
|
|
|
|
|
|
|
|
|
(* Prerequisite to sending message: move buffer to end. *)
|
2025-09-10 01:41:59 +01:00
|
|
|
fun loop () =
|
2025-08-07 12:20:57 +01:00
|
|
|
let
|
2025-09-10 01:41:59 +01:00
|
|
|
val (buffer, searchString, time) = Mailbox.recv SearchMailbox.mailbox
|
2025-08-07 14:40:14 +01:00
|
|
|
val searchList = SearchList.build (buffer, searchString)
|
2025-09-07 13:37:14 +01:00
|
|
|
val msg = InputMsg.WITH_SEARCH_LIST (searchList, time)
|
2025-09-10 01:41:59 +01:00
|
|
|
val () = InputMailbox.append msg
|
2025-08-07 12:20:57 +01:00
|
|
|
in
|
2025-09-10 01:41:59 +01:00
|
|
|
loop ()
|
2025-08-07 12:20:57 +01:00
|
|
|
end
|
|
|
|
|
end
|