mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-05 13:40:08 +08:00
Shorten to one epoch per PDU
A full read cycle can take a very long time if the limits are set too high.
This commit is contained in:
parent
b49f51879f
commit
b2e57148fa
@ -128,6 +128,11 @@ handle_pdus( void *ctx, void *arg )
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
assert( IS_ALIVE( c, c_refcnt ) );
|
||||
epoch_leave( epoch );
|
||||
epoch = epoch_join();
|
||||
assert( IS_ALIVE( c, c_refcnt ) );
|
||||
}
|
||||
|
||||
event_add( c->c_read_event, c->c_read_timeout );
|
||||
|
@ -132,6 +132,7 @@ int try_release_ref( uintptr_t *refp, void *object, dispose_cb *cb );
|
||||
*/
|
||||
#define RELEASE_REF( object, ref_field, cb ) \
|
||||
do { \
|
||||
assert( IS_ALIVE( (object), ref_field ) ); \
|
||||
if ( !__atomic_sub_fetch( \
|
||||
&(object)->ref_field, 1, __ATOMIC_ACQ_REL ) ) { \
|
||||
epoch_append( object, (dispose_cb *)cb ); \
|
||||
|
Loading…
Reference in New Issue
Block a user