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
Currently, yojson is not safe to use within domains, causing random Stdlib.Queue.Empty exceptions. The reason is that it is using Format, which uses a shared state by default.
The format issue was addressed in part by ocaml/ocaml#10453, but it requires code changes.
The text was updated successfully, but these errors were encountered:
Thanks for the report, however it looks like Format.synchronized_formatter_of_out_channel is marked as "unstable" (and possibly only available in 5.x, but the latter can be worked around with conditional compilation). That's a rather regrettable state of affairs.
But Format.formatter_of_out_channel is only used in to_channel, the user can use pp with their own formatter (so possibly the synchornized one). Does that solve your the thread safety issue?
It would be nice to have a repro-case but I understand that building reliable thread-safety repro cases is pretty difficult.
Currently, yojson is not safe to use within domains, causing random
Stdlib.Queue.Empty
exceptions. The reason is that it is usingFormat
, which uses a shared state by default.The format issue was addressed in part by ocaml/ocaml#10453, but it requires code changes.
The text was updated successfully, but these errors were encountered: