Quick question. Making testType a ref object fixed the issue but does it still need to be a var? The code still works when I use let which is slightly confusing to me.
e.g.: import asyncdispatch type testType = ref object testField: bool proc testProc(thing: testType) {.async.} = if thing.testField: thing.testField = false proc newThing(): testType = new result result.testField = true let x = newThing() waitFor testProc(x) echo x.testField Run I admittedly have very little experience with ref types.