Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix queue #44

Closed
wants to merge 5 commits into from
Closed

Conversation

rustyrussell
Copy link
Contributor

@jb55 told me that shrinking the queue caused deadlock, and indeed it does: mainly because we discard on inserting to a full queue. The code itself was a bit baroque, but working.

I changed threadpool.h and it didn't rebuild.  There are others, too.

Signed-off-by: Rusty Russell <[email protected]>
I wondered by gdb was getting stuck!

Suggested-by: jb55
Signed-off-by: Rusty Russell <[email protected]>
Will noted that the tests failed with a smaller queue, and this why.

This fixes the problem and we add a "try" function next for when we
don't want to block.

Signed-off-by: Rusty Russell <[email protected]>
They're not worth inlining, and we're about to add some routines which
aren't for public consumption.

Signed-off-by: Rusty Russell <[email protected]>
1. Write generic routines to copy bytes in and out of ring buffer.
2. Write generic routines to pull/pull with/without blocking.
3. Implemented *_many and *_try functions in these terms.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell
Copy link
Contributor Author

Something else is wrong, closing for now...

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

Successfully merging this pull request may close these issues.

1 participant