Encapsulate State to make it impossible to read
This was NightLightStateMachine's purpose, but it fits equally well in the actual production code.
This commit is contained in:
parent
a741938f89
commit
bd550bfcd9
4 changed files with 29 additions and 29 deletions
|
|
@ -77,7 +77,7 @@ let mainAsync _ =
|
|||
let mqttClientOptions = MqttClientOptionsBuilder().WithTcpServer(server).Build()
|
||||
|
||||
let stateLock = new SemaphoreSlim(1, 1)
|
||||
let mutable state = { Time = DateTime.Now }
|
||||
let mutable state = State DateTime.Now
|
||||
|
||||
mqttClient.add_ApplicationMessageReceivedAsync (fun e ->
|
||||
async {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue