Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@chenbd
Copy link
Contributor

@chenbd chenbd commented Dec 6, 2018

This PR try calculating the exact timeout for socketpool's pool entry.

Copy link
Member

@kazuho kazuho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome. Until reading the PR, I hadn't realized the fact that we could eliminate the inefficiency by using the timerwheel.

The code looks fine modulo the issue below.

__sync_sub_and_fetch(&pool->_shared.pooled_count, 1);
}
}
return SIZE_MAX;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UINT64_MAX?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, should be UINT64_MAX for 32 bit system.

static void check_pool_expired_locked(h2o_socketpool_t *pool)
{
uint64_t next_expired = destroy_expired_locked(pool);
if (next_expired != SIZE_MAX) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@kazuho kazuho merged commit efd3a06 into h2o:master Feb 12, 2019
@kazuho
Copy link
Member

kazuho commented Feb 12, 2019

Thank you for the changes.

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.

2 participants