Closed apelisse closed 1 year ago
Still not sure how this would end-up being nil ...
I've tried giving a nil swagger, and it fails when trying to serialize the json (as expected), not with a nil json ...
Next question is: if the swagger object changes causing a race, would it return a nil/empty json? I guess it's possible since that's probably undefined behavior.
@apelisse I don't think we need this anymore now that the cache is thread safe?
We still have some fairly odd wiring here that maybe makes it worth it to check whether this is thread-safe. Also let me remove the mutex, it shouldn't be needed now.
I've removed the lock and improved the race test a little bit, should be good to go now, PTAL.
/lgtm /approve /hold (if you want to fix up the last comment)
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: apelisse, Jefftree
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Appended Chan
to all the channels in that test.
/lgtm /unhold
cc @soltysh @liggitt