C
C#14mo ago
а

✅ Thread-safe facade.

I'm making a realtime parser, that will read values from websocket connection and update a facade object. If I will write values in facade class without any lock statements(directly, without using multiple statements methods), could am I catch any sort of thread errors? I suppose that change/read operations from field/attribute is atmoic operation, is it truth? If is not, how I can implement this behaviuor correctly?
2 Replies
boiled goose
boiled goose14mo ago
if you're using async/await correctly then you will have no problems
а
а14mo ago
OK. Thanks!