thread error
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2392
JThread 1.2.0
JThread project provides some classes to make use of threads easy on different platforms. more>>
JThread project provides some classes to make use of threads easy on different platforms.
The classes are actually rather simple wrappers around existing thread implementations.
The package contains two classes: JThread and JMutex, which (obviously) represent a thread and a mutex. For unix-like platforms, the class implementations use the pthread library. On an MS-Windows platform, native Win32 threads are used.
The library is totally FREE!
Enhancements:
- The JMutexAutoLock class was added.
- In Win32 and WinCE, it is now possible to use a critical section object instead of a mutex handle.
<<lessThe classes are actually rather simple wrappers around existing thread implementations.
The package contains two classes: JThread and JMutex, which (obviously) represent a thread and a mutex. For unix-like platforms, the class implementations use the pthread library. On an MS-Windows platform, native Win32 threads are used.
The library is totally FREE!
Enhancements:
- The JMutexAutoLock class was added.
- In Win32 and WinCE, it is now possible to use a critical section object instead of a mutex handle.
Download (MB)
Added: 2006-03-20 License: MIT/X Consortium License Price:
1325 downloads
RT-Thread 0.2.2
RT-Thread is a real-time operating system. more>>
RT-Thread is a real-time operating system. It is designed specifically for small memory footprint platforms. The kernel supports the tranditional RTOS services, such as multiple threads, semaphores, mutexes, event flags, mailboxes, etc.
RT-Thread project also provides a C-expression interpreter shell, from which a programmer can access kernel variables and invoke system functions.
Main features:
Kernel Object System
- There is a kernel object system, which can access and manage all of the kernel objects. Kernel objects include most of the facilities in the kernel, for example, thread, semaphore etc. Kernel objects can be static objects, whose memory is allocated in compiling. It can be dynamic objects as well, whose memory is allocated from system heaps in runtime. Through the kernel object system, RT-Thread operating system can be independent from the memory management system and greatly enhance the scalability of the system.
Multi-Task/Thread Scheduling
- RT-Thread operating system supports multi-task systems, which are based on thread scheduling. The scheduling algorithm used in RT-Thread operating system is a full preemptive priority-based scheduling algorithm. It supports 256 priority levels, in which 0 is the highest and 255 the lowest. The 255th priority is used for idle thread. The scheduling algorithm also supports threads running at same priority level. The shared time-slice round-robin scheduling is used for this case. The time of scheduler to determine the next highest ready thread is determinant. The number of threads in the system is unlimited, only related with RAM.
Synchronization Mechanisms
- RT-Thread operating system supports the traditional semaphore and mutex. Mutex objects use inherited priority to prevent priority reversion. The semaphore release action is safe for interrupt service routine. Moreover, the block queue for thread to obtain semaphore or mutex can be sorted by priority or FIFO.
Inter-Thread Communication
- RT-Thread operating systems supports event/fast event, mail box and message queue. The event mechanism is used to awake a thead by setting one or more corresponding bit of a binary number when an event ocurs. The fast event supports event thread queue. Once a one bit event occurs, the corresponding blocked thread can be found out timing accurately, then will be waked up. In mailbox, a mail length is fixed to 4 byte, which is more effective than message queue. The send action for communication facilities is also safe for interrupt service routine.
Clock and Timer
- In default, the system uses clock tick to implement shared time-slice scheduling. The timing sensitivity of thread is implemented by timers. The timer can be set as one-shot or periodic timeout.
Memory Management
- RT-Thread operating system supports two types memory management: static memory pool management and dynamic memory heap management. The time to allocate a memory block from the memory pool is determinant and when the memory pool is empty, the allocated thread can be blocked (or immediately return, or waiting for sometime to return, which are determined by a timeout parameter). When other thread releases memory blocks to this memory pool, the blocked thread is wake up.
Enhancements:
- More porting was done to Samsung S3C44b0 CPU, AMTEL AT91SAM7S64, Nintendo DS, and Intel i386.
<<lessRT-Thread project also provides a C-expression interpreter shell, from which a programmer can access kernel variables and invoke system functions.
Main features:
Kernel Object System
- There is a kernel object system, which can access and manage all of the kernel objects. Kernel objects include most of the facilities in the kernel, for example, thread, semaphore etc. Kernel objects can be static objects, whose memory is allocated in compiling. It can be dynamic objects as well, whose memory is allocated from system heaps in runtime. Through the kernel object system, RT-Thread operating system can be independent from the memory management system and greatly enhance the scalability of the system.
Multi-Task/Thread Scheduling
- RT-Thread operating system supports multi-task systems, which are based on thread scheduling. The scheduling algorithm used in RT-Thread operating system is a full preemptive priority-based scheduling algorithm. It supports 256 priority levels, in which 0 is the highest and 255 the lowest. The 255th priority is used for idle thread. The scheduling algorithm also supports threads running at same priority level. The shared time-slice round-robin scheduling is used for this case. The time of scheduler to determine the next highest ready thread is determinant. The number of threads in the system is unlimited, only related with RAM.
Synchronization Mechanisms
- RT-Thread operating system supports the traditional semaphore and mutex. Mutex objects use inherited priority to prevent priority reversion. The semaphore release action is safe for interrupt service routine. Moreover, the block queue for thread to obtain semaphore or mutex can be sorted by priority or FIFO.
Inter-Thread Communication
- RT-Thread operating systems supports event/fast event, mail box and message queue. The event mechanism is used to awake a thead by setting one or more corresponding bit of a binary number when an event ocurs. The fast event supports event thread queue. Once a one bit event occurs, the corresponding blocked thread can be found out timing accurately, then will be waked up. In mailbox, a mail length is fixed to 4 byte, which is more effective than message queue. The send action for communication facilities is also safe for interrupt service routine.
Clock and Timer
- In default, the system uses clock tick to implement shared time-slice scheduling. The timing sensitivity of thread is implemented by timers. The timer can be set as one-shot or periodic timeout.
Memory Management
- RT-Thread operating system supports two types memory management: static memory pool management and dynamic memory heap management. The time to allocate a memory block from the memory pool is determinant and when the memory pool is empty, the allocated thread can be blocked (or immediately return, or waiting for sometime to return, which are determined by a timeout parameter). When other thread releases memory blocks to this memory pool, the blocked thread is wake up.
Enhancements:
- More porting was done to Samsung S3C44b0 CPU, AMTEL AT91SAM7S64, Nintendo DS, and Intel i386.
Download (0.34MB)
Added: 2007-01-21 License: GPL (GNU General Public License) Price:
1009 downloads
Thread::Tie 0.12
Thread::Tie can tie variables into a thread of their own. more>>
Thread::Tie can tie variables into a thread of their own.
SYNOPSIS
use Thread::Tie; # use as early as possible for maximum memory savings
# use default thread + tieing + create thread when needed
tie $scalar, Thread::Tie;
tie @array, Thread::Tie;
tie %hash, Thread::Tie;
tie *HANDLE, Thread::Tie;
# use alternate implementation
tie $scalar, Thread::Tie,
{ module => Own::Tie::Implementation, # used automatically
use => Use::This::Module::Also, # optional, also as []
eval => arbitrary Perl code, # optional
};
# initialize right away
tie $scalar, Thread::Tie, {}, 10;
tie @array, Thread::Tie, {}, qw(a b c);
tie %hash, Thread::Tie, {}, (a => A, b => B, c => C);
tie *HANDLE, Thread::Tie, {},>:layer,filename;
# create an alternate thread and use that
my $tiethread = Thread::Tie::Thread->new;
tie $scalar, Thread::Tie, {thread => $tiethread};
# object methods
my $tied = tie stuff,Thread::Tie,parameters;
my $tied = tied( stuff );
my $semaphore = $tied->semaphore; # scalar for lock()ing tied variable
my $module = $tied->module; # module tied to in thread
my $tiethread = $tied->thread; # thread to which variable is tied
my $tid = $tiethread->tid; # thread id of tied thread
my $thread = $tiethread->thread; # actual "threads" thread
untie( stuff ); # calls DESTROY in thread, cleans up thoroughly
Thread::Tie->shutdown; # shut down default handling thread
$tiethread->shutdown; # shut down specific thread
<<lessSYNOPSIS
use Thread::Tie; # use as early as possible for maximum memory savings
# use default thread + tieing + create thread when needed
tie $scalar, Thread::Tie;
tie @array, Thread::Tie;
tie %hash, Thread::Tie;
tie *HANDLE, Thread::Tie;
# use alternate implementation
tie $scalar, Thread::Tie,
{ module => Own::Tie::Implementation, # used automatically
use => Use::This::Module::Also, # optional, also as []
eval => arbitrary Perl code, # optional
};
# initialize right away
tie $scalar, Thread::Tie, {}, 10;
tie @array, Thread::Tie, {}, qw(a b c);
tie %hash, Thread::Tie, {}, (a => A, b => B, c => C);
tie *HANDLE, Thread::Tie, {},>:layer,filename;
# create an alternate thread and use that
my $tiethread = Thread::Tie::Thread->new;
tie $scalar, Thread::Tie, {thread => $tiethread};
# object methods
my $tied = tie stuff,Thread::Tie,parameters;
my $tied = tied( stuff );
my $semaphore = $tied->semaphore; # scalar for lock()ing tied variable
my $module = $tied->module; # module tied to in thread
my $tiethread = $tied->thread; # thread to which variable is tied
my $tid = $tiethread->tid; # thread id of tied thread
my $thread = $tiethread->thread; # actual "threads" thread
untie( stuff ); # calls DESTROY in thread, cleans up thoroughly
Thread::Tie->shutdown; # shut down default handling thread
$tiethread->shutdown; # shut down specific thread
Download (0.015MB)
Added: 2007-08-06 License: Perl Artistic License Price:
809 downloads
DM1 Threads Library 1.0.5
DM1 Threads Library is a portable threads library in C++. more>>
DM1 Thread Library is part of the DM1 project. This library was born out of my need to have a portable C++ Thread library that would be simple to use, and would provide all the necessary Threads functionality I required for the DM1 project.
Initially, this library was in C, but when I decided to re-write DM1 in C++, I ported the library to C++. During the port, I enhanced the functionality of the Threads library.
The DM1 Threads library aims to be small. It does not try to provide a comprehensive set of functionality, but only what is absolutely essential for a project like DM1. I had the simplicity of the Java Threads package in mind when creating this library.
The constructs provided by the DM1 Thread library are:
- Thread objects that represent Operating System threads.
- A Mutex is provided as a mechanism for Mutual Exclusion . Mutexes are used to ensure that a piece of code is executed by only one thread at any point in time.
- Events are provided as low-level mechanisms for thread synchronisation. Events can be waited for, and signalled to.
- A higher level object, that combines the functionality of an Event and a Mutex, is provided. This is the Monitor object. A Monitor can be locked exclusively, just like a Mutex, but it can also be made the object of a Wait operation. The signalling mechanism supports notification of one or more waiting threads.
- To enable more efficient locking when both shared and exclusive access to data is required, Latches are provided.
- Apart from the Thread synchronisation primitives described above, the library also provides a ThreadPool for the situation when it is inefficient to create a thread exclusively for a particular task, and it is desirable to share a pool of threads for executing multiple tasks.
Design Principles
The DM1 Threads library was designed with the following principles in mind:
1. Implement the bare minimum that is required. This Threads library does not aim to be a comprehensive threads package.
2. Avoid complex algorithms. If a particular construct is hard to implement correctly on all platforms, avoid it.
3. Document the library.
4. Avoid low level code, such as assembler code to implement Spin locks. Rely on the libraries provided by the Operating System.
5. Avoid holding Mutexes beyond function calls. A DM1 Thread library function will not hold any Mutex locks when it returns.
6. Avoid using clever C++ techniques wherever possible. (Unfortunately, some cleverness is required to implement the Thread class correctly).
7. Avoid dependency on external libraries. The DM1 library only requires the standard C library, apart from native Threads functionality.
8. Always report an error as soon as it is discovered.
9. Insert debug messages that can be switched on at run-time.
10. Do not throw exceptions from destructors because these might be executing as a result of an uncaught exception.
11. Never let an error go unreported.
<<lessInitially, this library was in C, but when I decided to re-write DM1 in C++, I ported the library to C++. During the port, I enhanced the functionality of the Threads library.
The DM1 Threads library aims to be small. It does not try to provide a comprehensive set of functionality, but only what is absolutely essential for a project like DM1. I had the simplicity of the Java Threads package in mind when creating this library.
The constructs provided by the DM1 Thread library are:
- Thread objects that represent Operating System threads.
- A Mutex is provided as a mechanism for Mutual Exclusion . Mutexes are used to ensure that a piece of code is executed by only one thread at any point in time.
- Events are provided as low-level mechanisms for thread synchronisation. Events can be waited for, and signalled to.
- A higher level object, that combines the functionality of an Event and a Mutex, is provided. This is the Monitor object. A Monitor can be locked exclusively, just like a Mutex, but it can also be made the object of a Wait operation. The signalling mechanism supports notification of one or more waiting threads.
- To enable more efficient locking when both shared and exclusive access to data is required, Latches are provided.
- Apart from the Thread synchronisation primitives described above, the library also provides a ThreadPool for the situation when it is inefficient to create a thread exclusively for a particular task, and it is desirable to share a pool of threads for executing multiple tasks.
Design Principles
The DM1 Threads library was designed with the following principles in mind:
1. Implement the bare minimum that is required. This Threads library does not aim to be a comprehensive threads package.
2. Avoid complex algorithms. If a particular construct is hard to implement correctly on all platforms, avoid it.
3. Document the library.
4. Avoid low level code, such as assembler code to implement Spin locks. Rely on the libraries provided by the Operating System.
5. Avoid holding Mutexes beyond function calls. A DM1 Thread library function will not hold any Mutex locks when it returns.
6. Avoid using clever C++ techniques wherever possible. (Unfortunately, some cleverness is required to implement the Thread class correctly).
7. Avoid dependency on external libraries. The DM1 library only requires the standard C library, apart from native Threads functionality.
8. Always report an error as soon as it is discovered.
9. Insert debug messages that can be switched on at run-time.
10. Do not throw exceptions from destructors because these might be executing as a result of an uncaught exception.
11. Never let an error go unreported.
Download (0.23MB)
Added: 2006-02-17 License: GPL (GNU General Public License) Price:
1344 downloads
Thread::Pool 0.32
Thread::Pool contains group of threads for performing similar jobs. more>>
Thread::Pool contains group of threads for performing similar jobs.
SYNOPSIS
use Thread::Pool;
$pool = Thread::Pool->new(
{
optimize => cpu, # default: memory
pre => sub {shift; print "starting worker with @_n",
do => sub {shift; print "doing job for @_n"; reverse @_},
post => sub {shift; print "stopping worker with @_n",
stream => sub {shift; print "streamline with @_n",
monitor => sub { print "monitor with @_n",
pre_post_monitor_only => 0, # default: 0 = also for "do"
checkpoint => sub { print "checkpointingn" },
frequency => 1000,
autoshutdown => 1, # default: 1 = yes
workers => 10, # default: 1
maxjobs => 50, # default: 5 * workers
minjobs => 5, # default: maxjobs / 2
},
qw(a b c) # parameters to "pre" and "post" routine
);
$pool->job( qw(d e f) ); # not interested in result
$jobid = $pool->job( qw(g h i) );
@result = $pool->result( $jobid ); # wait for result to be ready
$jobid = $pool->job( qw(j k l) );
@result = $pool->result_dontwait( $jobid ); # do _not_ wait for result
@result = $pool->waitfor( qw(m n o) ); # submit and wait for result
$pool->add; # add worker(s)
$pool->remove; # remove worker(s)
$pool->workers( 10 ); # adapt number of workers
$pool->join; # wait for all removed worker threads to finish
$workers = $pool->workers;
$todo = $pool->todo;
$removed = $pool->removed;
$pool->maxjobs( 100 ); # adapt or (de-)activate job throttling
$pool->minjobs( 10 );
$pool->autoshutdown( 1 ); # shutdown when object is destroyed
$pool->shutdown; # wait until all jobs done
$pool->abort; # finish current job and remove all workers
$done = $pool->done; # simple thread-use statistics
$notused = $pool->notused;
Thread::Pool->remove_me; # inside "do" only
<<lessSYNOPSIS
use Thread::Pool;
$pool = Thread::Pool->new(
{
optimize => cpu, # default: memory
pre => sub {shift; print "starting worker with @_n",
do => sub {shift; print "doing job for @_n"; reverse @_},
post => sub {shift; print "stopping worker with @_n",
stream => sub {shift; print "streamline with @_n",
monitor => sub { print "monitor with @_n",
pre_post_monitor_only => 0, # default: 0 = also for "do"
checkpoint => sub { print "checkpointingn" },
frequency => 1000,
autoshutdown => 1, # default: 1 = yes
workers => 10, # default: 1
maxjobs => 50, # default: 5 * workers
minjobs => 5, # default: maxjobs / 2
},
qw(a b c) # parameters to "pre" and "post" routine
);
$pool->job( qw(d e f) ); # not interested in result
$jobid = $pool->job( qw(g h i) );
@result = $pool->result( $jobid ); # wait for result to be ready
$jobid = $pool->job( qw(j k l) );
@result = $pool->result_dontwait( $jobid ); # do _not_ wait for result
@result = $pool->waitfor( qw(m n o) ); # submit and wait for result
$pool->add; # add worker(s)
$pool->remove; # remove worker(s)
$pool->workers( 10 ); # adapt number of workers
$pool->join; # wait for all removed worker threads to finish
$workers = $pool->workers;
$todo = $pool->todo;
$removed = $pool->removed;
$pool->maxjobs( 100 ); # adapt or (de-)activate job throttling
$pool->minjobs( 10 );
$pool->autoshutdown( 1 ); # shutdown when object is destroyed
$pool->shutdown; # wait until all jobs done
$pool->abort; # finish current job and remove all workers
$done = $pool->done; # simple thread-use statistics
$notused = $pool->notused;
Thread::Pool->remove_me; # inside "do" only
Download (0.026MB)
Added: 2007-08-22 License: Perl Artistic License Price:
794 downloads
State Threads 1.8
State Threads project is a small library for designing scalable Internet applications. more>>
State Threads project is a small library for designing scalable Internet applications.
The State Threads is a small application library which provides a foundation for writing fast and highly scalable Internet applications (such as Web servers, proxy servers, mail transfer agents, etc.) on UNIX-like platforms.
It offers a threading API for structuring a network application as an event-driven state machine.
The State Threads library is a derivative of the Netscape Portable Runtime library (NSPR) and therefore is distributed under the Mozilla Public License (MPL) version 1.1 or the GNU General Public License (GPL) version 2 or later.
Enhancements:
- Added support for kqueue and epoll on platforms that support them.
- Added ability to choose the event notification system at program startup.
- Long-overdue public definitions of ST_UTIME_NO_TIMEOUT (-1ULL) and ST_UTIME_NO_WAIT (0) [bug 1514436].
- Documentation patch for st_utime() [bug 1514484].
- Documentation patch for st_timecache_set() [bug 1514486].
- Documentation patch for st_netfd_serialize_accept() [bug 1514494].
- Added st_writev_resid() [rfe 1538344].
- Added st_readv_resid() [rfe 1538768] and, for symmetry, st_readv().
<<lessThe State Threads is a small application library which provides a foundation for writing fast and highly scalable Internet applications (such as Web servers, proxy servers, mail transfer agents, etc.) on UNIX-like platforms.
It offers a threading API for structuring a network application as an event-driven state machine.
The State Threads library is a derivative of the Netscape Portable Runtime library (NSPR) and therefore is distributed under the Mozilla Public License (MPL) version 1.1 or the GNU General Public License (GPL) version 2 or later.
Enhancements:
- Added support for kqueue and epoll on platforms that support them.
- Added ability to choose the event notification system at program startup.
- Long-overdue public definitions of ST_UTIME_NO_TIMEOUT (-1ULL) and ST_UTIME_NO_WAIT (0) [bug 1514436].
- Documentation patch for st_utime() [bug 1514484].
- Documentation patch for st_timecache_set() [bug 1514486].
- Documentation patch for st_netfd_serialize_accept() [bug 1514494].
- Added st_writev_resid() [rfe 1538344].
- Added st_readv_resid() [rfe 1538768] and, for symmetry, st_readv().
Download (0.097MB)
Added: 2007-03-16 License: MPL (Mozilla Public License) Price:
953 downloads
Threads-pop3d 1.0.2
Threads-pop3d provides a very fast and light THREADS POP3 Daemon which can work with MySQL. more>>
Threads-pop3d provides a very fast and light THREADS POP3 Daemon which can work with MySQL.
THREADS POP is an implementation of the Post Office Protocol server that conforms fully to the specifications in RFC 1939 (and later ones). For start/stop use /etc/rc.d/init.d/threads-pop3d.init script.
After start THREADS POP uses syslogd to log all messages. If you will have some problems look in the file /var/log/mail.log. This daemon first print there information about started threads. Later you can see information about logged users. If you end work (dont forget about threads-pop3d.init script) you will see how many connections served everyone thread.
The extra one thread show you how many connections daemon needed create for surplus. I.e. your daemon goes with 10 threads. In the one time connect themself 10 clients.
Then server creates next threads to serve next clients. Now every extra client (connected in this same time) increases surpluses counter. After disconnection stays so many children as you gave in -c option. In the one time server cant overdraft MAX_CHILDREN number.
If he does, then next clients must wait for disconnection the connected one.
<<lessTHREADS POP is an implementation of the Post Office Protocol server that conforms fully to the specifications in RFC 1939 (and later ones). For start/stop use /etc/rc.d/init.d/threads-pop3d.init script.
After start THREADS POP uses syslogd to log all messages. If you will have some problems look in the file /var/log/mail.log. This daemon first print there information about started threads. Later you can see information about logged users. If you end work (dont forget about threads-pop3d.init script) you will see how many connections served everyone thread.
The extra one thread show you how many connections daemon needed create for surplus. I.e. your daemon goes with 10 threads. In the one time connect themself 10 clients.
Then server creates next threads to serve next clients. Now every extra client (connected in this same time) increases surpluses counter. After disconnection stays so many children as you gave in -c option. In the one time server cant overdraft MAX_CHILDREN number.
If he does, then next clients must wait for disconnection the connected one.
Download (0.16MB)
Added: 2007-02-26 License: GPL (GNU General Public License) Price:
972 downloads
Thread Safe Template Library 1.1.0
Thread Safe Template Library (TSTL) is a C++ library that provides thread-safe storage data structures without global locking. more>>
Thread Safe Template Library (TSTL) is a C++ library that provides thread-safe storage data structures without global locking. The library includes classes for maps based on a non-binary extensible hashing tree for very fast access, a pipe, a timercache, and a fast writer multiple reader guard without global locking (which uses the interlocked Intel instruction set).
Enhancements:
- Porting for x64 AMD, Intel, and MSVC 8.0.
- A new cache template with policy by element number.
- Access to elements has been implemented via a map template.
- The adding policy in the timer cache template has been changed.
- The string hash routine has been optimized.
- The timings in the nbmap.h template have changed.
<<lessEnhancements:
- Porting for x64 AMD, Intel, and MSVC 8.0.
- A new cache template with policy by element number.
- Access to elements has been implemented via a map template.
- The adding policy in the timer cache template has been changed.
- The string hash routine has been optimized.
- The timings in the nbmap.h template have changed.
Download (0.034MB)
Added: 2007-05-03 License: Freeware Price:
908 downloads
Mac::Errors 1.13
Mac::Errors is a Perl module with constants for Mac error codes. more>>
Mac::Errors is a Perl module with constants for Mac error codes.
SYNOPSIS
use Mac::Errors qw(openErr);
if( $value == openErr ) { ... }
my $error = $MacErrors{ $symbol }; # -- OR -- my $error = $MacErrors{ $number };
my $symbol = $error->symbol; my $number = $error->number; my $desc = $error->description;
# in MacPerl, $^E is meaningful, and we tie $MacError to it use Mac::Errors qw( $MacError );
open FILE, $foo or die $^E; # error number open FILE, $foo or die $MacError; # gets description from $^E
The %MacErrors hash indexes error information by the error number or symbol. Each value is a Mac::Errors object which has the symbol, number, and description.
The $MacError scalar performs some tied magic to translate MacPerls $^E to the error text.
<<lessSYNOPSIS
use Mac::Errors qw(openErr);
if( $value == openErr ) { ... }
my $error = $MacErrors{ $symbol }; # -- OR -- my $error = $MacErrors{ $number };
my $symbol = $error->symbol; my $number = $error->number; my $desc = $error->description;
# in MacPerl, $^E is meaningful, and we tie $MacError to it use Mac::Errors qw( $MacError );
open FILE, $foo or die $^E; # error number open FILE, $foo or die $MacError; # gets description from $^E
The %MacErrors hash indexes error information by the error number or symbol. Each value is a Mac::Errors object which has the symbol, number, and description.
The $MacError scalar performs some tied magic to translate MacPerls $^E to the error text.
Download (0.053MB)
Added: 2007-03-07 License: Perl Artistic License Price:
963 downloads
Thread::Apartment 0.51
Thread::Apartment is an apartment threading wrapper for Perl objects. more>>
Thread::Apartment is an apartment threading wrapper for Perl objects.
SYNOPSIS
package MyClass;
use Thread::Apartment::Server;
use base qw(Thread::Apartment::Server);
sub new {
#
# the usual constructor
#
}
#
# mark some methods as simplex
#
sub get_simplex_methods {
return { bar => 1 };
}
#
# mark some methods as urgent
#
sub get_urgent_methods {
return { bingo => 1 };
}
sub foo {
#
# do something
#
}
sub bar {
#
# do something else
#
}
sub bingo {
print "BINGO!n";
}
1;
#
# create pool of 20 apartment threads
#
Thread::Apartment->create_pool(AptPoolSize => 20);
my $apt = Thread::Apartment->new(
AptClass => MyClass, # class to install in apartment
AptTimeout => 10, # timeout secs for TQD responses
AptRequire => { # classes to require into the thread
This::Class => 1.234,
That::Class => 0.02
},
AptParams => @params_for_MyClass) || die $@;
my $result = $apt->foo(@params);
die $@ unless $result;
#
# bar is simplex
#
$apt->bar(@params);
Thread::Apartment provides an apartment threading wrapper for Perl classes. "Apartment threading" is a method for isolating an object (or object hierarchy) in its own thread, and providing external interfaces via lightweight client proxy objects. This approach is especially valuable in the Perl threads environment, which doesnt provide a direct means of passing complex, nested structure objects between threads, and for non-threadsafe legacy object architectures, e.g., Perl/Tk.
By using lightweight client proxy objects that implement the Thread::Queue::Queueable interface, with Thread::Queue::Duplex objects as the communication channel between client proxies and apartment threads (or between threads in general), a more thread-friendly OO environment is provided, ala Java, i.e., the ability to pass arbitrary objects between arbitrary threads.
<<lessSYNOPSIS
package MyClass;
use Thread::Apartment::Server;
use base qw(Thread::Apartment::Server);
sub new {
#
# the usual constructor
#
}
#
# mark some methods as simplex
#
sub get_simplex_methods {
return { bar => 1 };
}
#
# mark some methods as urgent
#
sub get_urgent_methods {
return { bingo => 1 };
}
sub foo {
#
# do something
#
}
sub bar {
#
# do something else
#
}
sub bingo {
print "BINGO!n";
}
1;
#
# create pool of 20 apartment threads
#
Thread::Apartment->create_pool(AptPoolSize => 20);
my $apt = Thread::Apartment->new(
AptClass => MyClass, # class to install in apartment
AptTimeout => 10, # timeout secs for TQD responses
AptRequire => { # classes to require into the thread
This::Class => 1.234,
That::Class => 0.02
},
AptParams => @params_for_MyClass) || die $@;
my $result = $apt->foo(@params);
die $@ unless $result;
#
# bar is simplex
#
$apt->bar(@params);
Thread::Apartment provides an apartment threading wrapper for Perl classes. "Apartment threading" is a method for isolating an object (or object hierarchy) in its own thread, and providing external interfaces via lightweight client proxy objects. This approach is especially valuable in the Perl threads environment, which doesnt provide a direct means of passing complex, nested structure objects between threads, and for non-threadsafe legacy object architectures, e.g., Perl/Tk.
By using lightweight client proxy objects that implement the Thread::Queue::Queueable interface, with Thread::Queue::Duplex objects as the communication channel between client proxies and apartment threads (or between threads in general), a more thread-friendly OO environment is provided, ala Java, i.e., the ability to pass arbitrary objects between arbitrary threads.
Download (0.072MB)
Added: 2007-06-14 License: Perl Artistic License Price:
862 downloads
Net::DBus::Error 0.33.4
Net::DBus::Error is a Perl module with error details for remote method invocation. more>>
Net::DBus::Error is a Perl module with error details for remote method invocation.
SYNOPSIS
package Music::Player::UnknownFormat;
use base qw(Net::DBus::Error);
# Define an error type for unknown track encoding type
# for a music player service
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new(name => "org.example.music.UnknownFormat",
message => "Unknown track encoding format");
}
package Music::Player::Engine;
...snip...
# Play either mp3 or ogg music tracks, otherwise
# thrown an error
sub play {
my $self = shift;
my $url = shift;
if ($url =~ /.(mp3|ogg)$/) {
...play the track
} else {
die Music::Player::UnknownFormat->new();
}
}
This objects provides for strongly typed error handling. Normally a service would simply call
die "some message text"
When returning the error condition to the calling DBus client, the message is associated with a generic error code or "org.freedesktop.DBus.Failed". While this suffices for many applications, occasionally it is desirable to be able to catch and handle specific error conditions. For such scenarios the service should create subclasses of the Net::DBus::Error object providing in a custom error name. This error name is then sent back to the client instead of the genreic "org.freedesktop.DBus.Failed" code
<<lessSYNOPSIS
package Music::Player::UnknownFormat;
use base qw(Net::DBus::Error);
# Define an error type for unknown track encoding type
# for a music player service
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new(name => "org.example.music.UnknownFormat",
message => "Unknown track encoding format");
}
package Music::Player::Engine;
...snip...
# Play either mp3 or ogg music tracks, otherwise
# thrown an error
sub play {
my $self = shift;
my $url = shift;
if ($url =~ /.(mp3|ogg)$/) {
...play the track
} else {
die Music::Player::UnknownFormat->new();
}
}
This objects provides for strongly typed error handling. Normally a service would simply call
die "some message text"
When returning the error condition to the calling DBus client, the message is associated with a generic error code or "org.freedesktop.DBus.Failed". While this suffices for many applications, occasionally it is desirable to be able to catch and handle specific error conditions. For such scenarios the service should create subclasses of the Net::DBus::Error object providing in a custom error name. This error name is then sent back to the client instead of the genreic "org.freedesktop.DBus.Failed" code
Download (0.092MB)
Added: 2006-11-13 License: Perl Artistic License Price:
1075 downloads
Plone Error Reporting 1.1
Plone Error Reporting is a project which facilitates the submission of useful bug reports to Plone. more>>
Plone Error Reporting is a project which facilitates the submission of useful bug reports to Plone.
PloneErrorReporting replaces default_error_message and prefs_error_log_showEntry with pages that facilitate the submission of useful bug reports to Plone.
It is designed with the goal of improving the information provided by bug reporters.
To see PloneErrorReporting in action, first install the product, then create a python script called imabug in the ZMI that contains the single line
raise AttributeError, bad attribute
Now, while still authenticated, load the page http://mysite/imabug. You should see a step-by-step procedure for reporting bugs at the bottom of the error page as long as you are logged in as a Manager. Similarly, when you view bugs in the Plone error log, you will see the bug submitting procedure.
Enhancements:
- Moved the product to use its own translation domain. This fixes an issue were half-translated sentences showed up in the templates.
<<lessPloneErrorReporting replaces default_error_message and prefs_error_log_showEntry with pages that facilitate the submission of useful bug reports to Plone.
It is designed with the goal of improving the information provided by bug reporters.
To see PloneErrorReporting in action, first install the product, then create a python script called imabug in the ZMI that contains the single line
raise AttributeError, bad attribute
Now, while still authenticated, load the page http://mysite/imabug. You should see a step-by-step procedure for reporting bugs at the bottom of the error page as long as you are logged in as a Manager. Similarly, when you view bugs in the Plone error log, you will see the bug submitting procedure.
Enhancements:
- Moved the product to use its own translation domain. This fixes an issue were half-translated sentences showed up in the templates.
Download (0.010MB)
Added: 2007-02-20 License: GPL (GNU General Public License) Price:
976 downloads
Unicode Error Detector 1.0
Unicode Error Detector is a product for Plone used to pinpoint errors in your application leading to UnicodeDecodeErrors. more>>
Unicode Error Detector is a product for Plone used to pinpoint errors in your application leading to UnicodeDecodeErrors.
Do not use this product unless you are actively debugging a Unicode Error. Never use this product in production sites.
UnicodeDecodeErrors typically occur when you try to add a Unicode string to a non-ascii string. This product patches StringIO used by page templates to check if the appended string is a Unicode string, and if it is, it replaces the string with an error marker.
As there is some overhead associated with inspecting the strings instead of just appending to the output, this product is meant for debugging purposes only.
Usage
Put the product in your Products directory and restart Zope. Load the template causing the UnicodeDecodeError, and this tool will indicate the location by printing THIS IS WHERE THE ERROR IS in the rendered template.
You can then inspect the template and/or code more closely to figure out where the decode error happens.
<<lessDo not use this product unless you are actively debugging a Unicode Error. Never use this product in production sites.
UnicodeDecodeErrors typically occur when you try to add a Unicode string to a non-ascii string. This product patches StringIO used by page templates to check if the appended string is a Unicode string, and if it is, it replaces the string with an error marker.
As there is some overhead associated with inspecting the strings instead of just appending to the output, this product is meant for debugging purposes only.
Usage
Put the product in your Products directory and restart Zope. Load the template causing the UnicodeDecodeError, and this tool will indicate the location by printing THIS IS WHERE THE ERROR IS in the rendered template.
You can then inspect the template and/or code more closely to figure out where the decode error happens.
Download (0.001MB)
Added: 2007-03-28 License: GPL (GNU General Public License) Price:
942 downloads
Inter-Thread Communication 1.1.3
Inter-Thread Communication (ITC) aims to make it exceedingly easy to call functions in other threads. more>>
Inter-Thread Communication (ITC) aims to make it exceedingly easy to call functions in other threads.
The lexer does all the work, so just run the lexer on your headers, then call the stub functions.
In addition, it also provides a complete threading API, with the four threading primitives and a high speed threadsafe FIFO class.
Enhancements:
- It add support for GCC 4.x, and the build system is fixed.
<<lessThe lexer does all the work, so just run the lexer on your headers, then call the stub functions.
In addition, it also provides a complete threading API, with the four threading primitives and a high speed threadsafe FIFO class.
Enhancements:
- It add support for GCC 4.x, and the build system is fixed.
Download (0.41MB)
Added: 2006-07-06 License: GPL (GNU General Public License) Price:
1214 downloads
Mail::Thread::Chronological 1.22
Mail::Thread::Chronological can rearrange Mail::Thread::Containers into a Chronological structure. more>>
Mail::Thread::Chronological can rearrange Mail::Thread::Containers into a Chronological structure.
SYNOPSIS
use Mail::Thread;
use Mail::Thread::Chronological;
my $threader = Mail::Thread->new( @messages );
my $lurker = Mail::Thread::Chronological->new;
$threader->thread;
for my $thread ($threader->rootset) {
for my $row ( $lurker->arrange( $thread ) ) {
my $container = grep { ref $_ } @$row;
print join(, map { ref $_ ? * : $_ } @$row),
" ", $container->messageid, "n";
}
Given a Mail::Thread::Container, Mail::Thread::Chronological transforms the tree structure into a 2-dimensional array representing the history of a given thread in time.
The output is similar to that of the Lurker mail archiving system, with a couple of small exceptions:
Characters used
The grid is populated with the characters (space), -, +, |, {, or Mail::Thread::Container objects. Lurker uses [a-g], and differentiates T-junctions from corners for you, this module assumes you will do that for yourself.
The characters mean:
space
empty cell
-
horizontal line
+
T junction or corner
|
vertical line
{
vertical line crossing over a horizontal line
Vertical stream crossing is permitted
In the original lurker crossing a path vertically is not allowed, this results in a lot of horizontal space being used.
<<lessSYNOPSIS
use Mail::Thread;
use Mail::Thread::Chronological;
my $threader = Mail::Thread->new( @messages );
my $lurker = Mail::Thread::Chronological->new;
$threader->thread;
for my $thread ($threader->rootset) {
for my $row ( $lurker->arrange( $thread ) ) {
my $container = grep { ref $_ } @$row;
print join(, map { ref $_ ? * : $_ } @$row),
" ", $container->messageid, "n";
}
Given a Mail::Thread::Container, Mail::Thread::Chronological transforms the tree structure into a 2-dimensional array representing the history of a given thread in time.
The output is similar to that of the Lurker mail archiving system, with a couple of small exceptions:
Characters used
The grid is populated with the characters (space), -, +, |, {, or Mail::Thread::Container objects. Lurker uses [a-g], and differentiates T-junctions from corners for you, this module assumes you will do that for yourself.
The characters mean:
space
empty cell
-
horizontal line
+
T junction or corner
|
vertical line
{
vertical line crossing over a horizontal line
Vertical stream crossing is permitted
In the original lurker crossing a path vertically is not allowed, this results in a lot of horizontal space being used.
Download (0.005MB)
Added: 2006-06-28 License: Perl Artistic License Price:
1213 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above thread error search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed