turbo
b70ba367 - fix(turborepo): Watch mode not responding to changes (#8057)

Commit
1 year ago
fix(turborepo): Watch mode not responding to changes (#8057) ### Description When I converted to a `watch` channel, I ended up introducing an annoying bug. Basically you can't tell if the value has been read already in a `watch` channel. So if you send a rediscover, then with subsequent events it's impossible to determine if the rediscover has been seen and you should send a new event, or if it's not seen and therefore you should send nothing. I fixed this by reverting back to the lock version and addressed @gsoltis's comments by using a tokio Mutex which yields to the runtime when grabbing the lock. ### Testing Instructions Validated that we get the right change events. Also validated that with regular Mutex and no `yield_now`, we get a deadlock, while with tokio Mutex and no `yield_now` we don't deadlock. Closes TURBO-2907
Author
Parents
Loading