Closed lazeratops closed 8 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
daily-ai-assistant-demo | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 11, 2023 0:58am |
This PR adds locks to collections that have a chance of being read and written from different threads at the same time.
Note that this is a simplistic approach for the purpose of the demo; if we want to be fancy we probably want to implement RW locks, but if desired that can be done as a followup to this PR. If optimizing, we might also consider investigating whether it makes sense to batch context updates to avoid potential for many locks while repeatedly updating and querying in close succession.
This PR also runs OpenAI requests in separate threads to avoid blocking the main thread.