You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was just troubleshooting this following strange situation:
asyncdefreaper():
reaper_simdjson_parser=simdjson.Parser()
whileTrue:
awaitasyncio.sleep(1)
text=awaitget_json_payload()
doc=reaper_simdjson_parser.parse(text)
*results, status=docforxinresults:
# do something# del x # forgetting to explicitly delete x would cause intermittent problemsdelstatusdelresultsdeldoc
the error is this:
doc = reaper_simdjson_parser.parse(text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "simdjson/csimdjson.pyx", line 435, in csimdjson.Parser.parse
RuntimeError: Tried to re-use a parser while simdjson.Object and/or simdjson.Array objects still exist referencing the old parser.
Perhaps specifying which reference is dangling may be helpful? At the very least putting it in the documentation as a potential gotcha might be helpful.
Thank you for pysimdjson and simdjson in general. Huge fan.
The text was updated successfully, but these errors were encountered:
Unfortunately we only keep a reference count, since tracking with more detail would be a significant performance and potentially significant memory hit.
Version 7.0.0 (#124) switches to using the new(ish) document object in simdjson, which means the lifecycle of the objects and the parser can be disconnected without issue.
Hello, I was just troubleshooting this following strange situation:
the error is this:
Perhaps specifying which reference is dangling may be helpful? At the very least putting it in the documentation as a potential gotcha might be helpful.
Thank you for pysimdjson and simdjson in general. Huge fan.
The text was updated successfully, but these errors were encountered: