Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Unsafe for concurrency #18

Closed
tech10 opened this issue Mar 16, 2021 · 3 comments
Closed

Unsafe for concurrency #18

tech10 opened this issue Mar 16, 2021 · 3 comments

Comments

@tech10
Copy link
Contributor

tech10 commented Mar 16, 2021

Currently, race testing fails. This library is not concurrent safe, and probably should be.

@firstrow
Copy link
Owner

The test itself was not implemented properly. Please see commit 035a34b

Thanks. 👍

@tech10 tech10 changed the title Race test fails Unsafe for concurrency Mar 16, 2021
@tech10
Copy link
Contributor Author

tech10 commented Mar 16, 2021

I can still see several examples of this library being used concurrently on the same server or client object. Currently, this will produce race conditions. While I can agree that the users code should be safe for concurrency, the libraries behind the users code should also be safe. The commit referenced only fixes the race test, but I think the library itself should be safe for concurrent operation. If this is modified to be concurrent safe, the tests should intentionally attempt to produce race conditions to try and test the concurrent safety of the library. Since this is a server library, I think it's a good assumption to make that concurrent operations will occur.

@firstrow
Copy link
Owner

This makes a lot of sense.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants