Comment

Comment by lefra

I see no issue here.

Modifying a variable that is read by another thread needs special care in all multithreaded languages I know. If you don't use a synchronization primitive to tell the other thread "hey, this thing here may have changed, read it again from memory"; the other thread is free to use its old value for as long as it whishes.

parent lefra 13 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton