fergiemcdowall / search-index

A persistent, network resilient, full text search library for the browser and Node.js
MIT License
1.38k stars 149 forks source link

`PUT`s should be internally queued #538

Closed fergiemcdowall closed 3 years ago

fergiemcdowall commented 3 years ago

At the moment you have to manually keep track of when a PUT has completed before you initiate the next PUT. However, search-index will allow concurrent PUTs without error thereby messing up the index.

Solution: queue PUTs internally so the user does not have to handle this.

fergiemcdowall commented 3 years ago

ref -> https://github.com/fergiemcdowall/search-index/issues/537

fergiemcdowall commented 3 years ago

possibly use https://github.com/sindresorhus/p-queue