MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / ProcessThread

Function ProcessThread

templates/chat-console-cs/Program.cs:193–211  ·  view source on GitHub ↗
(DbConnection conn, CancellationToken ct)

Source from the content-addressed store, hash-verified

191
192/// Our separate thread from main, where we can call process updates and process commands without blocking the main thread.
193void ProcessThread(DbConnection conn, CancellationToken ct)
194{
195 try
196 {
197 // loop until cancellation token
198 while (!ct.IsCancellationRequested)
199 {
200 conn.FrameTick();
201
202 ProcessCommands(conn.Reducers);
203
204 Thread.Sleep(100);
205 }
206 }
207 finally
208 {
209 conn.Disconnect();
210 }
211}
212
213/// Read each line of standard input, and either set our name or send a message as appropriate.
214void InputLoop()

Callers 1

MainFunction · 0.85

Calls 3

ProcessCommandsFunction · 0.85
FrameTickMethod · 0.45
DisconnectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…