view release on metacpan or search on metacpan
lib/Async/Chain.pm view on Meta::CPAN
=head1 RATIONALE
A asynchronous code often have deep nested callbacks, therefore it is tangled
and hard to change. This module help to converta a code like following to some
more readable form. Also, with C<chain> you can easily skip some unneeded steps
in this thread. For example jump to log step after the first failed query in
the chain.
without chain:
sub f {
view all matches for this distribution
view release on metacpan or search on metacpan
calls. It just run the passed subroutines and keep count of the
call-back functions called by the aforementionned subroutines. When
all these subs are finished, it calls another call-back (passed by the
user) to perform whatever function required by the user.
Using fork or threads or whatever is left to the user.
=head1 Methods
=head2 new( set => [sub, sub, ...], [test => 1] )
view all matches for this distribution
view release on metacpan or search on metacpan
Interrupt.pm view on Meta::CPAN
This module implements a single feature only of interest to advanced perl
modules, namely asynchronous interruptions (think "UNIX signals", which
are very similar).
Sometimes, modules wish to run code asynchronously (in another thread,
or from a signal handler), and then signal the perl interpreter on
certain events. One common way is to write some data to a pipe and use an
event handling toolkit to watch for I/O events. Another way is to send
a signal. Those methods are slow, and in the case of a pipe, also not
asynchronous - it won't interrupt a running perl interpreter.
This module implements asynchronous notifications that enable you to
signal running perl code from another thread, asynchronously, and
sometimes even without using a single syscall.
=head2 USAGE SCENARIOS
=over 4
Interrupt.pm view on Meta::CPAN
completely.
This can be used to implement the signal handling in event loops,
e.g. L<AnyEvent>, L<POE>, L<IO::Async::Loop> and so on.
=item Background threads want speedy reporting
Assume you want very exact timing, and you can spare an extra cpu core
for that. Then you can run an extra thread that signals your perl
interpreter. This means you can get a very exact timing source while your
perl code is number crunching, without even using a syscall to communicate
between your threads.
For example the deliantra game server uses a variant of this technique
to interrupt background processes regularly to send map updates to game
clients.
Interrupt.pm view on Meta::CPAN
L<IO::AIO> and L<BDB> could also use this to speed up result reporting.
=item Speedy event loop invocation
One could use this module e.g. in L<Coro> to interrupt a running coro-thread
and cause it to enter the event loop.
Or one could bind to C<SIGIO> and tell some important sockets to send this
signal, causing the event loop to be entered to reduce network latency.
Interrupt.pm view on Meta::CPAN
warn "signal $_ received\n";
}
}
}
=head2 Interrupt perl from another thread
This example interrupts the Perl interpreter from another thread, via the
XS API. This is used by e.g. the L<EV::Loop::Async> module.
On the Perl level, a new loop object (which contains the thread)
is created, by first calling some XS constructor, querying the
C-level callback function and feeding that as the C<c_cb> into the
Async::Interrupt constructor:
my $self = XS_thread_constructor;
my ($c_func, $c_arg) = _c_func $self; # return the c callback
my $asy = new Async::Interrupt c_cb => [$c_func, $c_arg];
Then the newly created Interrupt object is queried for the signaling
function that the newly created thread should call, and this is in turn
told to the thread object:
_attach $self, $asy->signal_func;
So to repeat: first the XS object is created, then it is queried for the
callback that should be called when the Interrupt object gets signalled.
Then the interrupt object is queried for the callback function that the
thread should call to signal the Interrupt object, and this callback is
then attached to the thread.
You have to be careful that your new thread is not signalling before the
signal function was configured, for example by starting the background
thread only within C<_attach>.
That concludes the Perl part.
The XS part consists of the actual constructor which creates a thread,
which is not relevant for this example, and two functions, C<_c_func>,
which returns the Perl-side callback, and C<_attach>, which configures
the signalling functioon that is safe toc all from another thread. For
simplicity, we will use global variables to store the functions, normally
you would somehow attach them to C<$self>.
The C<c_func> simply returns the address of a static function and arranges
for the object pointed to by C<$self> to be passed to it, as an integer:
Interrupt.pm view on Meta::CPAN
CODE:
{
my_sig_func = sig_func;
my_sig_arg = sig_arg;
/* now run the thread */
thread_create (&u->tid, l_run, 0);
}
And C<l_run> (the background thread) would eventually call the signaling
function:
my_sig_func (my_sig_arg, 0);
You can have a look at L<EV::Loop::Async> for an actual example using
intra-thread communication, locking and so on.
=head1 THE Async::Interrupt CLASS
=over 4
Interrupt.pm view on Meta::CPAN
An example call would look like:
signal_func (signal_arg, 0);
The function is safe to call from within signal and thread contexts, at
any time. The specified C<value> is passed to both C and Perl callback.
C<$value> must be in the valid range for a C<sig_atomic_t>, except C<0>
(1..127 is portable).
Interrupt.pm view on Meta::CPAN
afterwards.
Note that there must be exactly one call of C<unblock> for every previous
call to C<block> (i.e. calls can nest).
Since ensuring this in the presence of exceptions and threads is
usually more difficult than you imagine, I recommend using C<<
$async->scoped_block >> instead.
=item $async->scope_block
This call C<< $async->block >> and installs a handler that is called when
the current scope is exited (via an exception, by canceling the Coro
thread, by calling last/goto etc.).
This is the recommended (and fastest) way to implement critical sections.
=item ($block_func, $block_arg) = $async->scope_block_func
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Simple/Pool.pm view on Meta::CPAN
$self->read_tasks() if grep $_->has_id, @{ $self->tasks };
$self->write_tasks();
if ( $break_on_busy ) {
$self->log( 'PROCESS', 'internal cycle exit: all threads are busy' ) if $self->logger;
last;
}
# Has not started data
next if scalar @{ $self->queue_keys };
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Async/Trampoline.pm view on Meta::CPAN
This module does not implement an event loop.
The C<run_until_completion()> function does run a dispatch loop,
but there is no concept of events, I/O, or timers.
Check out the L<IO::Async|IO::Async> module instead.
This module is not thread-aware.
Handling the same Async on multiple threads is undefined behaviour.
This module does not detect infinite loops.
It is your responsibility to ensure
that Async dependencies don't form cycles.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsyncPing.pm view on Meta::CPAN
Please also notice that since ICMP can only be sent by root, if you want to use this library, you'll have to run your program as root.
If the ping requests are going through firewall, your ping requests could possibly be discarded by firewall, don't blame the library.
since every process share same network interface and usually there is only 1 network interface on a server, I think it doens't really help if you make it parallel
or multi-threaded to increase speed. Just like you don't get much benefit if you make more threads while you have only 1 CPU. But you can test on your own, good luck!
=cut
my $ICMP_PING = 'ccnnna*';
my $identifier = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
share/lexicons/app/bsky/actor/defs.json view on Meta::CPAN
"#contentLabelPref",
"#savedFeedsPref",
"#savedFeedsPrefV2",
"#personalDetailsPref",
"#feedViewPref",
"#threadViewPref",
"#interestsPref",
"#mutedWordsPref",
"#hiddenPostsPref",
"#bskyAppStatePref",
"#labelersPref"
share/lexicons/app/bsky/actor/defs.json view on Meta::CPAN
"type": "boolean",
"description": "Hide quote posts in the feed."
}
}
},
"threadViewPref": {
"type": "object",
"properties": {
"sort": {
"type": "string",
"description": "Sorting mode for threads.",
"knownValues": ["oldest", "newest", "most-likes", "random", "hotness"]
},
"prioritizeFollowedUsers": {
"type": "boolean",
"description": "Show followed users at the top of all replies."
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Atomic/Pipe.pm view on Meta::CPAN
# than a larger value on my test machine.
my $read_size = min(SSIZE_MAX(), 65_536);
*DEFAULT_READ_SIZE = sub() { $read_size };
}
my $can_thread = 1;
$can_thread &&= $] >= 5.008001;
$can_thread &&= $Config{'useithreads'};
# Threads are broken on perl 5.10.0 built with gcc 4.8+
if ($can_thread && $] == 5.010000 && $Config{'ccname'} eq 'gcc' && $Config{'gccversion'}) {
my @parts = split /\./, $Config{'gccversion'};
$can_thread = 0 if $parts[0] > 4 || ($parts[0] == 4 && $parts[1] >= 8);
}
$can_thread &&= !$INC{'Devel/Cover.pm'};
if (!$can_thread) {
*_get_tid = sub() { 0 };
}
elsif ($INC{'threads.pm'}) {
*_get_tid = sub() { threads->tid() };
}
else {
*_get_tid = sub() { $INC{'threads.pm'} ? threads->tid() : 0 };
}
if ($^O eq 'MSWin32') {
local $@;
eval { require Win32::API; 1 } or die "non-blocking on windows requires Win32::API please install it.\n$@";
lib/Atomic/Pipe.pm view on Meta::CPAN
Atomic::Pipe - Send atomic messages from multiple writers across a POSIX pipe.
=head1 DESCRIPTION
Normally if you write to a pipe from multiple processes/threads, the messages
will come mixed together unpredictably. Some messages may be interrupted by
parts of messages from other writers. This module takes advantage of some POSIX
specifications to allow multiple writers to send arbitrary data down a pipe in
atomic chunks to avoid the issue.
lib/Atomic/Pipe.pm view on Meta::CPAN
POSIX.1 requires PIPE_BUF to be at least 512 bytes. (On Linux,
PIPE_BUF is 4096 bytes.) [...]
Under the hood this module will split your message into small sections of
slightly smaller than the PIPE_BUF limit. Each message will be sent as 1 atomic
chunk with a 4 byte prefix indicating what process id it came from, what thread
id it came from, a chunk ID (in descending order, so if there are 3 chunks the
first will have id 2, the second 1, and the final chunk is always 0 allowing a
flush as it knows it is done) and then 1 byte with the length of the data
section to follow.
On the receiving end this module will read chunks and re-assemble them based on
the header data. So the reader will always get complete messages. Note that
message order is not guarenteed when messages are sent from multiple processes
or threads. Though all messages from any given thread/process should be in
order.
=head1 SYNOPSIS
use Atomic::Pipe;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
use strict;
our $VERSION = '0.80';
$VERSION = eval { $VERSION }; # make the alpha version come out as a number
# Make Test::Builder thread-safe for ithreads.
BEGIN {
use Config;
# Load threads::shared when threads are turned on.
# 5.8.0's threads are so busted we no longer support them.
if( $] >= 5.008001 && $Config{useithreads} && $INC{'threads.pm'}) {
require threads::shared;
# Hack around YET ANOTHER threads::shared bug. It would
# occassionally forget the contents of the variable when sharing it.
# So we first copy the data, then share, then put our copy back.
*share = sub (\[$@%]) {
my $type = ref $_[0];
my $data;
inc/Test/Builder.pm view on Meta::CPAN
}
else {
die("Unknown type: ".$type);
}
$_[0] = &threads::shared::share($_[0]);
if( $type eq 'HASH' ) {
%{$_[0]} = %$data;
}
elsif( $type eq 'ARRAY' ) {
inc/Test/Builder.pm view on Meta::CPAN
}
return $_[0];
};
}
# 5.8.0's threads::shared is busted when threads are off
# and earlier Perls just don't have that module at all.
else {
*share = sub { return $_[0] };
*lock = sub { 0 };
}
inc/Test/Builder.pm view on Meta::CPAN
$self->{Expected_Tests} = $self->{Curr_Test};
}
# Auto-extended arrays and elements which aren't explicitly
# filled in with a shared reference will puke under 5.8.0
# ithreads. So we have to fill them in by hand. :(
my $empty_result = &share({});
for my $idx ( 0..$self->{Expected_Tests}-1 ) {
$test_results->[$idx] = $empty_result
unless defined $test_results->[$idx];
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Attribute/Lexical.pm view on Meta::CPAN
attributes, in particular L<Attribute::Handlers>. However, the underlying
protocol for attribute management is tricky, and convoluted arrangements
of attribute managers are liable to tread on each other's toes.
The management of handler functions is likely to run into trouble where
threads are used. Code compiled before any threads are created should
be OK, as should anything contained entirely within a single thread,
but code shared between threads will probably have trouble due to Perl
not properly sharing data structures.
=head1 SEE ALSO
L<Attribute::Handlers>,
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Test/Builder.pm view on Meta::CPAN
my @Test_Details = ();
my($Test_Died) = 0;
my($Have_Plan) = 0;
my $Curr_Test = 0;
# Make Test::Builder thread-safe for ithreads.
BEGIN {
use Config;
if( $] >= 5.008 && $Config{useithreads} ) {
require threads;
require threads::shared;
threads::shared->import;
share(\$Curr_Test);
share(\@Test_Details);
share(\@Test_Results);
}
else {
t/lib/Test/Builder.pm view on Meta::CPAN
ok
ok
ok
Most useful when you can't depend on the test output order, such as
when threads or forking is involved.
Test::Harness will accept either, but avoid mixing the two styles.
Defaults to on.
t/lib/Test/Builder.pm view on Meta::CPAN
if( $No_Plan ) {
$self->_print("1..$Curr_Test\n") unless $self->no_header;
$Expected_Tests = $Curr_Test;
}
# 5.8.0 threads bug. Shared arrays will not be auto-extended
# by a slice.
$Test_Results[$Expected_Tests-1] = undef
unless defined $Test_Results[$Expected_Tests-1];
my $num_failed = grep !$_, @Test_Results[0..$Expected_Tests-1];
t/lib/Test/Builder.pm view on Meta::CPAN
$Test->_ending if defined $Test and !$Test->no_ending;
}
=head1 THREADS
In perl 5.8.0 and later, Test::Builder is thread-safe. The test
number is shared amongst all threads. This means if one thread sets
the test number using current_test() they will all be effected.
=head1 EXAMPLES
CPAN can provide the best examples. Test::Simple, Test::More,
view all matches for this distribution
view release on metacpan or search on metacpan
* fix for all possible problems. It won't catch where dTHR is needed, and
* doesn't attempt to account for global macro or function definitions,
* nested includes, typemaps, etc.
*
* In order to test for the need of dTHR, please try your module under a
* recent version of Perl that has threading compiled-in.
*
*/
/*
#ifndef START_MY_CXT
/*
* Boilerplate macros for initializing and accessing interpreter-local
* data from C. All statics in extensions should be reworked to use
* this, if you want to make the extension thread-safe. See ext/re/re.xs
* for an example of the use of these macros.
*
* Code that uses these macros is responsible for the following:
* 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
* 2. Declare a typedef named my_cxt_t that is a structure that contains
#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
/* This must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
* case below uses it to declare the data as static. */
#define START_MY_CXT
#if (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 ))
/* Fetches the SV that keeps the per-interpreter data. */
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-c.inc view on Meta::CPAN
#ifndef NVTYPE
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
#endif
#ifndef aTHX_
#define aTHX_ /* 5.6 or later define this for threading support. */
#endif
#ifndef pTHX_
#define pTHX_ /* 5.6 or later define this for threading support. */
#endif
static int
constant_12 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
view all matches for this distribution
view release on metacpan or search on metacpan
$(PERL_INC)/regcomp.h \
$(PERL_INC)/regexp.h \
$(PERL_INC)/regnodes.h \
$(PERL_INC)/scope.h \
$(PERL_INC)/sv.h \
$(PERL_INC)/thread.h \
$(PERL_INC)/unixish.h \
$(PERL_INC)/util.h
$(OBJECT) : $(PERL_HDRS)
ppd :
$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="1.00">' > $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <ABSTRACT>Perl extension for crossfade mixer.</ABSTRACT>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <AUTHOR>C4PC <adeamara@cloud4pc.com></AUTHOR>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="x86_64-linux-gnu-thread-multi-5.10" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
view all matches for this distribution
view release on metacpan or search on metacpan
$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="1.00">' > $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <ABSTRACT>Perl extension for open and streaming WAV files.</ABSTRACT>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <AUTHOR>C4PC <adeamara@cloud4pc.com></AUTHOR>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <REQUIRE NAME="Inline::" VERSION="0.44" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="x86_64-linux-gnu-thread-multi-5.10" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd
view all matches for this distribution
view release on metacpan or search on metacpan
Ecasound.pm view on Meta::CPAN
=head1 INSTALLATION
perl Makefile.PL
If your perl wasn't built with -Dusethreads or -D_REENTRANT you
will be prompted whether to continue with the install. It's in
your hands... See L<THREADING NOTE>
make
make test
make install
=head1 THREADING NOTE
The ecasoundc library uses pthreads so will may only work if
your perl was compiled with threading enabled, check with:
% perl -V:usethreads
You are welcome to try using the module with non-threaded perls
(perhaps -D_REENTRANT alone would work) it have worked for some.
=head1 EXPORT
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
no_fh_allowed|||
no_op|||
noperl_die|||vn
not_a_number|||
not_incrementable|||
nothreadhook||5.008000|
nuke_stacks|||
num_overflow|||n
oopsAV|||
oopsHV|||
op_append_elem||5.013006|
#endif
/* Hint: PL_ppaddr
* Calling an op via PL_ppaddr requires passing a context argument
* for threaded builds. Since the context argument is different for
* 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
* automatically be defined as the correct argument.
*/
#if (PERL_BCDVERSION <= 0x5005005)
#endif
/*
* Boilerplate macros for initializing and accessing interpreter-local
* data from C. All statics in extensions should be reworked to use
* this, if you want to make the extension thread-safe. See ext/re/re.xs
* for an example of the use of these macros.
*
* Code that uses these macros is responsible for the following:
* 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
* 2. Declare a typedef named my_cxt_t that is a structure that contains
defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
#ifndef START_MY_CXT
/* This must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
* case below uses it to declare the data as static. */
#define START_MY_CXT
#if (PERL_BCDVERSION < 0x5004068)
/* Fetches the SV that keeps the per-interpreter data. */
#else
/* older perls don't have PL_numeric_radix_sv so the radix
* must manually be requested from locale.h
*/
#include <locale.h>
dTHR; /* needed for older threaded perls */
struct lconv *lc = localeconv();
char *radix = lc->decimal_point;
if (radix && IN_LOCALE) {
STRLEN len = strlen(radix);
if (*sp + len <= send && memEQ(*sp, radix, len)) {
view all matches for this distribution
view release on metacpan or search on metacpan
const-c.inc view on Meta::CPAN
#ifndef NVTYPE
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
#endif
#ifndef aTHX_
#define aTHX_ /* 5.6 or later define this for threading support. */
#endif
#ifndef pTHX_
#define pTHX_ /* 5.6 or later define this for threading support. */
#endif
static int
constant_9 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
view all matches for this distribution
view release on metacpan or search on metacpan
* fix for all possible problems. It won't catch where dTHR is needed, and
* doesn't attempt to account for global macro or function definitions,
* nested includes, typemaps, etc.
*
* In order to test for the need of dTHR, please try your module under a
* recent version of Perl that has threading compiled-in.
*
*/
/*
#ifndef START_MY_CXT
/*
* Boilerplate macros for initializing and accessing interpreter-local
* data from C. All statics in extensions should be reworked to use
* this, if you want to make the extension thread-safe. See ext/re/re.xs
* for an example of the use of these macros.
*
* Code that uses these macros is responsible for the following:
* 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
* 2. Declare a typedef named my_cxt_t that is a structure that contains
#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
/* This must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
* case below uses it to declare the data as static. */
#define START_MY_CXT
#if (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 ))
/* Fetches the SV that keeps the per-interpreter data. */
view all matches for this distribution
view release on metacpan or search on metacpan
(2) The plugin will not attempt to make use of any library
functions with the exceptions of functions in the ANSI standard C
and C maths libraries, which the host is expected to provide.
(3) The plugin will not access files, devices, pipes, sockets, IPC
or any other mechanism that might result in process or thread
blocking.
(4) The plugin will take an amount of time to execute a run() or
run_adding() call approximately of form (A+B*SampleCount) where A
and B depend on the machine and host in use. This amount of time
view all matches for this distribution
view release on metacpan or search on metacpan
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
release=
rpath=
xrpath=
perm_rpath=
temp_rpath=
thread_safe=no
vinfo=
vinfo_number=no
weak_libs=
single_module=$wl-single_module
func_infer_tag $base_compile
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
test X-lc = "X$arg" && continue
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
test X-lc = "X$arg" && continue
;;
esac
elif test X-lc_r = "X$arg"; then
case $host in
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
esac
fi
func_append deplibs " $arg"
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
func_append finalize_command " $arg"
prev=xcompiler
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
case "$new_inherited_linker_flags " in
*" $arg "*) ;;
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
# would be equivalent was wrong. It would break on at least
# Digital Unix and AIX.
continue
;;
-thread-safe)
thread_safe=yes
continue
;;
-version-info)
prev=vinfo
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
for deplib in $libs; do
lib=
found=false
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
func_append compiler_flags " $deplib"
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
;;
*-*-sco3.2v5* | *-*-sco5v6*)
# Causes problems with __ctype
;;
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
# Compiler inserts libc in the correct place for threads to work
;;
*)
# Add libc to deplibs on all other systems if necessary.
if test yes = "$build_libtool_need_lc"; then
func_append deplibs " -lc"
libsamplerate/Cfg/ltmain.sh view on Meta::CPAN
func_append libobjs " $func_extract_archives_result"
test "X$libobjs" = "X " && libobjs=
fi
fi
if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
eval flag=\"$thread_safe_flag_spec\"
func_append linker_flags " $flag"
fi
# Make a backup of the uninstalled library when relinking
if test relink = "$opt_mode"; then
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Audio/M4P/QuickTime.pm view on Meta::CPAN
=head1 BUGS
=over 4
The Audio::M4P::* code is not re-entrant on a per-file basis, due to recursive
changes to containers not being thread-safe. Threaded code using these modules
may need to lock down all method calls with a semaphore or other serialization
method, unless only one thread is used to modify any given audio file.
=back
=head1 SEE ALSO WITH THIS MODULE
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-c.inc view on Meta::CPAN
#ifndef NVTYPE
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
#endif
#ifndef aTHX_
#define aTHX_ /* 5.6 or later define this for threading support. */
#endif
#ifndef pTHX_
#define pTHX_ /* 5.6 or later define this for threading support. */
#endif
static int
constant (pTHX_ const char *name, STRLEN len) {
/* Initially switch on the length of the name. */
view all matches for this distribution
view release on metacpan or search on metacpan
demo/fx1.wav
demo/mikmod.xpm
demo/player
demo/player-gtk-fork
demo/player-gtk-ipc
demo/player-gtk-thread
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/const-c.inc view on Meta::CPAN
#ifndef NVTYPE
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
#endif
#ifndef aTHX_
#define aTHX_ /* 5.6 or later define this for threading support. */
#endif
#ifndef pTHX_
#define pTHX_ /* 5.6 or later define this for threading support. */
#endif
static int
constant_8 (pTHX_ const char *name, IV *iv_return) {
/* When generated this function returned values for the list of names given
view all matches for this distribution
view release on metacpan or search on metacpan
mpg123/BENCHMARKING view on Meta::CPAN
-------------------------
Let's write a few notes about benchmarking the different mp3 decoders,
which are available. 'top' is NOT a benchmark, it's a simple check
how a program performs. The sad thing with 'top' is, that it has some
problems with the measurement of threaded programs of programs only
requesting short chunks of processor time. So, the only real test is
probably decoding a stream without threads with 100% CPU time and
measure the time how long your machine needs for it.
You can do this with mpg123 by doing a
time mpg123 -t mp3stream.mp3
or
time mpg123 -s mp3stream.mp3 > /dev/null
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use ExtUtils::MakeMaker;
my $fallbacklibs = "-lportaudio -lm -lpthread";
my $libs = "";
print "Testing for pkg-config...";
my $pcversion = `pkg-config --version`;
if ($pcversion) {
view all matches for this distribution
view release on metacpan or search on metacpan
include/ppport.h view on Meta::CPAN
ninstr|||
no_bareword_allowed|||
no_fh_allowed|||
no_op|||
not_a_number|||
nothreadhook||5.008000|
nuke_stacks|||
num_overflow|||n
oopsAV|||
oopsCV|||
oopsHV|||
include/ppport.h view on Meta::CPAN
save_scalar|||
save_set_svflags||5.009000|
save_shared_pvref||5.007003|
save_sptr|||
save_svref|||
save_threadsv||5.005000|
save_vptr||5.006000|
savepvn|||
savepv|||
savesharedpv||5.007003|
savestack_grow_cnt||5.008001|
include/ppport.h view on Meta::CPAN
#endif
/*
* Boilerplate macros for initializing and accessing interpreter-local
* data from C. All statics in extensions should be reworked to use
* this, if you want to make the extension thread-safe. See ext/re/re.xs
* for an example of the use of these macros.
*
* Code that uses these macros is responsible for the following:
* 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
* 2. Declare a typedef named my_cxt_t that is a structure that contains
include/ppport.h view on Meta::CPAN
defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT)
#ifndef START_MY_CXT
/* This must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
* case below uses it to declare the data as static. */
#define START_MY_CXT
#if (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION < 68 ))
/* Fetches the SV that keeps the per-interpreter data. */
include/ppport.h view on Meta::CPAN
#else
/* older perls don't have PL_numeric_radix_sv so the radix
* must manually be requested from locale.h
*/
#include <locale.h>
dTHR; /* needed for older threaded perls */
struct lconv *lc = localeconv();
char *radix = lc->decimal_point;
if (radix && IN_LOCALE) {
STRLEN len = strlen(radix);
if (*sp + len <= send && memEQ(*sp, radix, len)) {
view all matches for this distribution
view release on metacpan or search on metacpan
1.50.0 Sat Jan 22 15:41:45 PST 2011
- Based on taglib v 1.5. As of this writing, taglib is at v1.6.3,
consequently it's unlikely that this will be of much use to anyone.
It's being released as a checkpoint on the way to supporting that release.
Only fatal bugs will be addressed on this thread.
- While all of the tests pass, it's not guaranteed that all of the
TagLib functionality has been tested. YMMV!
- Add Audio:: to MODULE and DISTRIBUTION statements in xs/*
used script fix_dcls.pl
- Updated ppport.h
view all matches for this distribution
view release on metacpan or search on metacpan
Play/config/mmsystem.h view on Meta::CPAN
#define CALLBACK_NULL 0x00000000l /* no callback */
#define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */
#define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */
#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */
#ifdef _WIN32
#define CALLBACK_THREAD (CALLBACK_TASK)/* thread ID replaces 16 bit task */
#define CALLBACK_EVENT 0x00050000l /* dwCallback is an EVENT Handle */
#endif
/* flags for wFormatTag field of WAVEFORMAT */
#define WAVE_FORMAT_PCM 1
/* OLD general waveform format structure (information common to all formats) */
view all matches for this distribution