Jump to content
kokoslolos

Lockfree approach on a Single reader, Multiple Writer queue

Recommended Posts

My experience is that, if you are unlucky, bugs can lurk in multithreaded code way longer than in single threaded code. 

 

I have encountered (own and others) code, even single threaded, that should never  have worked, but for reason or other, it always has been. Until it'll present it self in worst possible, time, place and way :D

 

-Tee-

Edited by Tommi Prami

Share this post


Link to post
15 hours ago, Primož Gabrijelčič said:

If one writes a unit test which tests the specification in full, it can in theory prove that a single-threaded unit complies with the specification.

In theory, yes. But which unit tests can or do test the specification in full? Well, maybe some do, but e.g. the all so often used example of a unit test for an addition fails to test the full specification.

  • Like 1

Share this post


Link to post
On 3/7/2019 at 9:27 AM, M.Joos said:

In theory, yes. But which unit tests can or do test the specification in full? Well, maybe some do, but e.g. the all so often used example of a unit test for an addition fails to test the full specification.

Indeed. And full specs are often not available. You can always forget certain corner cases.

 

Dijkstra was right: you can only test for the presence, but never for the absence of deficiencies.

Edited by Rudy Velthuis

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×