Skip to content
Discussion options

You must be logged in to vote

Using FastAPI would explain why you were running into problems, since you can end up with a configuration where multiple threads are trying to modify the PhraseMatcher object at the same time. Some relevant FastAPI docs: https://fastapi.tiangolo.com/async/

My guess would be that creating a new phrase matcher each time is not going to be much slower (if at all) than trying to do the remove.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by raqibhayder
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / matcher Feature: Token, phrase and dependency matcher
2 participants
Converted from issue

This discussion was converted from issue #9862 on December 16, 2021 09:54.