-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hi team,
We are running following code to scan the text extracted from files, and getting this ScratchInUseError('error code -10'):
# Initialize db at the beginning only once.
db = hyperscan.Database()
db.compile(expressions=expressions, ids=ids, elements=len(patterns), flags=flags)
# Been called every time there's new file coming
hs_context = {"results": []}
db.scan(text, match_event_handler=self._on_match, context=hs_context)
The database is initialized only once at the beginning, and each time we encountered a file we call db.scan() method for hyperscan.
Wondering if there's a way to explicitly create new scratch space every time before we call db.scan(), and also free-up the space after scan completed? Thanks
Metadata
Metadata
Assignees
Labels
No labels