Skip to content

Error reporting changes introduced in v2.5.0 are thread-unsafe. Should it be documented or addressed ? #229

Answered by gavv
valsteen asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Thanks for report and digging into the problem.

httpexpect is not thread safe. If it was thread-safe in earlier releases, it was by accident.

However, I had thoughts on making top-level components thread-safe and documenting that (including Expect instance).

Ideally I'd make the lib thread-safe completely, but I'm not sure if making Request thread-safe would be easy: it can invoke user callbacks which may in turn directly or indirectly invoke methods of Request (because why not) and it can lead to hard-to-catch deadlocks.

I'll take a look of making chain thread-safe in upcoming days, this should be the very first step towards this direction because most components are based on it. The…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@valsteen
Comment options

@gavv
Comment options

gavv Jan 19, 2023
Maintainer

@gavv
Comment options

gavv Jan 24, 2023
Maintainer

@gavv
Comment options

gavv Jan 26, 2023
Maintainer

Answer selected by valsteen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants