view release on metacpan or search on metacpan
lib/Data/Rlist.pm view on Meta::CPAN
$attr = '-'.$attr unless $attr =~ /^-/;
exists $self->{$attr};
}
sub dock($\&) {
carp "package Data::Rlist locked" if $Locked++; # TODO: use critical sections and atomic increment
my ($self, $block) = @_;
local $MaxDepth = $self->get(-MaxDepth=>) if $self->has(-MaxDepth=>);
local $SafeCppMode = $self->get(-SafeCppMode=>) if $self->has(-SafeCppMode=>);
local $EchoStderr = $self->get(-EchoStderr=>) if $self->has(-EchoStderr=>);
local $RoundScientific = $self->get(-RoundScientific=>) if $self->has(-RoundScientific=>);
lib/Data/Rlist.pm view on Meta::CPAN
unless (defined $thing) {
if ($object->errors) {
print STDERR "$thingfile has syntax errors"
} else {
print STDERR "$thingfile not found, is locked or empty"
}
} else {
# Can use $thing
.
.
lib/Data/Rlist.pm view on Meta::CPAN
my($input, $fcmd, $fcmdargs) = @_;
my($rls, $filename);
my $rtp = reftype $input;
carp "\n${\((caller(0))[3])}: filename or scalar-ref required as INPUT" if defined $rtp && $rtp ne 'SCALAR';
carp "\n${\((caller(0))[3])}: package locked" if $Readstruct;
$Readstruct = $ReadFh = undef;
local $| = 1 if $DEBUG;
if (defined $input) {
$Readstruct = { };
lib/Data/Rlist.pm view on Meta::CPAN
ERROR: compile2() broken in deep ARRAY(0x101aaeec) (depth = 101, max-depth = 100)
This message will also be repeated as comment when the compiled Rlist is written to a file.
Furthermore F<$Data::Rlist::Broken> is incremented by one. While the compilation continues,
effectively any attempt to venture deeper as suggested by F<$Data::Rlist::MaxDepth> will be
blocked.
See F<L</broken>>.
=head2 Speeding up Compilation (Explicit Quoting)
view all matches for this distribution
view release on metacpan or search on metacpan
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED); /* a call that took the write lock counts (matches add_many) */
rb_rwlock_wrunlock(h); /* release BEFORE croak */
croak("Data::RoaringBitmap::Shared->add: container pool exhausted "
"(grow container_capacity)");
}
added = rb_add_locked(h, (uint32_t)x);
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_rwlock_wrunlock(h);
RETVAL = (IV)added;
OUTPUT:
RETVAL
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_rwlock_wrunlock(h); /* release BEFORE croak; partial adds remain (documented non-atomic) */
croak("Data::RoaringBitmap::Shared->add_many: container pool exhausted "
"after adding %" IVdf " element(s) (grow container_capacity)", total_added);
}
total_added += rb_add_locked(h, (uint32_t)vals[i]);
}
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_rwlock_wrunlock(h);
RETVAL = total_added;
OUTPUT:
EXTRACT(self);
CODE:
if (x > RB_UINT32_MAX_UV) { RETVAL = 0; } /* a value out of range is simply absent */
else {
rb_rwlock_rdlock(h);
RETVAL = rb_contains_locked(h, (uint32_t)x) ? 1 : 0;
rb_rwlock_rdunlock(h);
}
OUTPUT:
RETVAL
int removed;
CODE:
if (x > RB_UINT32_MAX_UV) { RETVAL = 0; } /* out of range -> nothing to remove */
else {
rb_rwlock_wrlock(h);
removed = rb_remove_locked(h, (uint32_t)x);
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_rwlock_wrunlock(h);
RETVAL = (IV)removed;
}
OUTPUT:
EXTRACT(self);
uint32_t v;
int found;
CODE:
rb_rwlock_rdlock(h);
found = rb_min_locked(h, &v);
rb_rwlock_rdunlock(h);
RETVAL = found ? newSVuv((UV)v) : &PL_sv_undef;
OUTPUT:
RETVAL
EXTRACT(self);
uint32_t v;
int found;
CODE:
rb_rwlock_rdlock(h);
found = rb_max_locked(h, &v);
rb_rwlock_rdunlock(h);
RETVAL = found ? newSVuv((UV)v) : &PL_sv_undef;
OUTPUT:
RETVAL
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_unlock_pair(h, o); /* release BEFORE croak */
croak("Data::RoaringBitmap::Shared->union: container pool exhausted "
"(needs %u more container(s); grow container_capacity)", need);
}
rb_union_locked(h, o);
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_unlock_pair(h, o);
SvREFCNT_inc(self); /* return the receiver for chaining */
RETVAL = self;
}
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
SvREFCNT_inc(self);
RETVAL = self;
} else {
rb_lock_pair(h, o); /* intersect never needs new slots */
rb_intersect_locked(h, o);
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_unlock_pair(h, o);
SvREFCNT_inc(self);
RETVAL = self;
}
SV *self
PREINIT:
EXTRACT(self);
CODE:
rb_rwlock_wrlock(h);
rb_clear_locked(h);
__atomic_fetch_add(&h->hdr->stat_ops, 1, __ATOMIC_RELAXED);
rb_rwlock_wrunlock(h);
SV *
stats(self)
view all matches for this distribution
view release on metacpan or search on metacpan
t/Data/File/Package.pm view on Meta::CPAN
# The eval messes with the stack. Since not using an eval, need
# to double check to make sure import does not die.
####
# Poor man's eval where trap off the Carp::croak function.
# The Perl authorities have Core::die locked down tight so
# it is next to impossible to trap off of Core::die. Lucky
# must everyone uses Carp::croak instead of just dieing.
#
# Anyway, get the benefit of a lot of stack gyrations to
# formulate the correct error msg by Exporter::import.
view all matches for this distribution
view release on metacpan or search on metacpan
t/Data/File/Package.pm view on Meta::CPAN
# The eval messes with the stack. Since not using an eval, need
# to double check to make sure import does not die.
####
# Poor man's eval where trap off the Carp::croak function.
# The Perl authorities have Core::die locked down tight so
# it is next to impossible to trap off of Core::die. Lucky
# must everyone uses Carp::croak instead of just dieing.
#
# Anyway, get the benefit of a lot of stack gyrations to
# formulate the correct error msg by Exporter::import.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Session/Driver/BerkeleyDB.pm view on Meta::CPAN
=head1 Method: traverse()
Retrieves all ids via a cursor, and for each id calls the supplied subroutine with the id as the
only parameter.
The database is not locked during this process.
Returns 1.
=head1 Installing BerkeleyDB
view all matches for this distribution
view release on metacpan or search on metacpan
get_av|5.006000|5.003007|p
getc|5.003007||Viu
get_c_backtrace|5.021001||Vi
get_c_backtrace_dump|5.021001||V
get_context|5.006000|5.006000|nu
getc_unlocked|5.003007||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
PERL_MALLOC_WRAP|5.009002|5.009002|Vn
PerlMem_calloc|5.006000||Viu
PerlMem_free|5.005000||Viu
PerlMem_free_lock|5.006000||Viu
PerlMem_get_lock|5.006000||Viu
PerlMem_is_locked|5.006000||Viu
PerlMem_malloc|5.005000||Viu
PERL_MEMORY_DEBUG_HEADER_SIZE|5.019009||Viu
PerlMemParse_calloc|5.006000||Viu
PerlMemParse_free|5.006000||Viu
PerlMemParse_free_lock|5.006000||Viu
PerlMemParse_get_lock|5.006000||Viu
PerlMemParse_is_locked|5.006000||Viu
PerlMemParse_malloc|5.006000||Viu
PerlMemParse_realloc|5.006000||Viu
PerlMem_realloc|5.005000||Viu
PerlMemShared_calloc|5.006000||Viu
PerlMemShared_free|5.006000||Viu
PerlMemShared_free_lock|5.006000||Viu
PerlMemShared_get_lock|5.006000||Viu
PerlMemShared_is_locked|5.006000||Viu
PerlMemShared_malloc|5.006000||Viu
PerlMemShared_realloc|5.006000||Viu
PERL_MG_UFUNC|5.007001||Viu
Perl_modf|5.006000|5.006000|n
PERL_MULTICONCAT_HEADER_SIZE|5.027006||Viu
putc|5.003007||Viu
put_charclass_bitmap_innards|5.021004||Viu
put_charclass_bitmap_innards_common|5.023008||Viu
put_charclass_bitmap_innards_invlist|5.023008||Viu
put_code_point|5.021004||Viu
putc_unlocked|5.003007||Viu
putenv|5.005000||Viu
put_range|5.019009||Viu
putw|5.003007||Viu
pv_display|5.006000|5.003007|p
pv_escape|5.009004|5.003007|p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/SortedSet/Shared.pm view on Meta::CPAN
}
1 while wait != -1; # reap children
print $z->count, "\n"; # 4000
Every operation is serialized by the rwlock, so concurrent writers do not corrupt
the tree. A writer can wake readers blocked in other processes through the
eventfd interface: it calls C<notify> after a batch, and a reader selects on
C<fileno> then drains the count with C<eventfd_consume>.
=head1 COMPLEXITY
view all matches for this distribution
view release on metacpan or search on metacpan
xt/dead_reader_recovery.t
xt/eg_runs.t
xt/fd_leak.t
xt/fd_validation.t
xt/fork_live.t
xt/fork_locked.t
xt/invalid_args.t
xt/kwalitee.t
xt/manifest_vs_git.t
xt/memfd_seal.t
xt/memfd_xproc.t
view all matches for this distribution
view release on metacpan or search on metacpan
during the read and returns false if the top changes concurrently beyond
the retry budget.
"drain" is safe under concurrent "push"/"pop", but it spin-waits on
slots whose pusher is mid-publish; a pusher crash between its position
CAS and the publish leaves drain blocked on that slot. Use "drain" for
orderly draining, not as a crash-recovery primitive.
Compatibility
File format bumped to v2 in this release (per-slot control array added
for MPMC safety). Opening a v1 file (magic "STK1") created by
view all matches for this distribution
view release on metacpan or search on metacpan
Data/Stag.pm view on Meta::CPAN
=head3 chainhandler
Title: chainhandler
Args: blocked events - str or str[]
initial handler - handler object
final handler - handler object
Returns:
Example: $h = Data::Stag->chainhandler('foo', $processor, 'xml')
Data/Stag.pm view on Meta::CPAN
);
$chainh = Data::Stag->chainhandler(['a', 'b'], $processor, 'xml');
$stag = Data::Stag->parse(-str=>"(...)", -handler=>$chainh)
If the inner handler has a method CONSUMES(), this method will
determine the blocked events if none are specified.
see also the script B<stag-handle.pl>
=head2 RECURSIVE SEARCHING
view all matches for this distribution