Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.587.379 Times

Parallel::ThreadContext 0.01

Company: Serge Tsafak
Date Added: September 23, 2013  |  Visits: 227

Parallel::ThreadContext

Report Broken Link
Printer Friendly Version


Product Homepage
Download (16 downloads)

This module provides a framework and some utilities for easy creation of multithreaded Perl programs.<br /> It introduces and uses the concept of context based concurrent threads. <br /> A context specifies a kind of name and work space for thread execution and consists of a queue + threads working on that queue + locks used by threads working on that queue.<br /> User can freely define as many contexts as he wants depending on its application logic e.g. 'prefetch', 'decode', 'execute', ...<br /> In each context threads are performing concurrent similar jobs on the same queue.<br /> All threads in the same context represent a thread group. Of course a group can consist of one thread only.<br /> Resources locked in one context do not affect other contexts.<br /><br />Features :<br /><br />version<br /><br /> return the current version information for this module<br /> <br /> arguments: none<br /> <br /> returns:<br /> version info of this module<br /><br />start<br /><br /> create and run a thread group to perform specific queue jobs <br /> all threads in the group will run the same code with different data and will share the same queue and same locks<br /> we say that they run in the same context.<br /> <br /> arguments:<br /> reference to code to be executed by each thread (mandatory)<br /> reference to array data (jobs) to be distributed to each thread (mandatory)<br /> number of threads to be started (mandatory)<br /> name to assign to this context of execution (optional, default context is assumed otherwise)<br /> <br /> returns: none<br /><br />end<br /><br /> terminate execution in the given context<br /> all affected threads will be asked to return (eventually wait till they have finished processing the queue)<br /> <br /> arguments:<br /> name of context (optional, default context is assumed otherwise)<br /> <br /> returns:<br /> reference to hash containing the return values from each exited thread (thread id is hash key)<br /><br />addJobsToQueue<br /><br /> push additional jobs onto the queue in the given context<br /> <br /> arguments:<br /> reference to array data (jobs) which will be pushed onto the queue (mandatory)<br /> name of context (optional, default context is assumed otherwise)<br /> <br /> returns: none<br /><br />finalizeQueue<br /><br /> prevent adding jobs in the given context (irreversible)<br /> affected threads will then known that their task is done and they can safely return as soon as queue is empty<br /> <br /> arguments:<br /> name of context (optional, default context is assumed otherwise)<br /> <br /> returns: none<br /><br />reserveLock<br /><br /> request and lock a resource<br /> any attempt to reserve the same lock will block until lock is released<br /> required for synchronisation of threads in the same context<br /> <br /> arguments:<br /> name of lock to be reserved (mandatory)<br /> name of context (optional, default context is assumed otherwise)<br /> <br /> returns: none<br /><br />releaseLock<br /><br /> release a previously locked resource<br /> any attempt to reserve the same lock will succeed after lock is released<br /> required for synchronisation of threads in the same context<br /> <br /> arguments:<br /> name of lock to be released (mandatory)<br /> name of context (optional, default context is assumed otherwise)<br /> <br /> returns: none<br /><br />getContextName<br /><br /> returns the name of context where calling thread is currently executed<br /> <br /> arguments: none<br /> <br /> returns:<br /> context name<br /><br />getNoProcessors<br /><br /> returns the number of machine processors as returned by underlying OS<br /> Most of Windows and UNIX-like systems supported<br /> <br /> arguments: none<br /> <br /> returns:<br /> number of processors on machine<br /><br />shareVariable<br /><br /> Make the variable (scalar, array, hash) referenced by the given argument visible to all threads (shared variable)<br /> A depth of up to 10 references is allowed (reference to reference to ... to variable)<br /> <br /> arguments:<br /> reference to variable to be shared (mandatory)<br /> <br /> returns: none<br /><br />yieldRuntime<br /><br /> ask threads in the given context to yield some runtime to threads in other contexts<br /> how long they will let processor to other threads depend on the underlying OS<br /> <br /> arguments:<br /> name of context (optional, default context is assumed otherwise)<br /> <br /> returns: none<br /><br />pauseCurrentThread<br /><br /> pause the calling thread for the given time length in seconds.<br /><br /> arguments:<br /> time length the thread shall pause<br /> <br /> returns: none<br /><br />println<br /><br /> print the given message by indicating source (Thread ID) and timestamp.<br /><br /> arguments:<br /> message to be printed out<br /> <br /> returns: none<br /><br />abortCurrentThread<br /><br /> abort calling thread and print the given message by indicating source (Thread ID) and timestamp before<br /><br /> arguments:<br /> message to be printed before exit<br /> <br /> returns: none

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Arguments Assumed Context Default Group Mandatory Message Number Optional Queue Reference Return Returns Thread Threads Variable Version
Users rating: 0/10

License: Freeware Size: 10.24 KB
PARALLEL::THREADCONTEXT RELATED
Security Tools  -  News Snarf 1.3
News Snarf software is a sample extension of the popular "dsniff" package that it will automatically track and log NNTP connections by USENET group and article number.
71.68 KB  
Modules  -  Cookie Check 6.x-1.0
Drupal requires cookies for user login, but by default no error message is given when a user's browser is set not to accept cookies. The result is a broken site--after attempting to log in, the user is returned to an empty login form with no...
10 KB  
Communication Tools  -  News Snarf 1.3
The newssnarf software is a sample extension of the popular 'dsniff' package in that it will automatically track and log NNTP connections by USENET group and article number.
70.97 KB  
Miscellaneous  -  Group a list into sequential n-tuples 1.0
Group a list into sequential n-tuples function returns a list of n-tuples from a single "flat" list.
 
Miscellaneous  -  Number Format function 1.2
This function takes a number (integer or float) and returns a string with the integer portion grouped by thousands and the decimal portion rounded or padded to given number of decimal places.
 
Modules  -  Diagonal Advertising Banner Plugin 1.0.2
The Diagonal Advertising Banner Plugin allows users to create a diagonal banner at the top right corner of a website with a text message and optional link. Besides using the Diagonal Advertising Banner as an advertising text banner, many other...
911.36 KB  
Utilities  -  Mosquitto 0.5.3
Mosquitto is a message broker that implements the MQ Telemetry Transport (MQTT) protocol version 3. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. Probably the most famous example of this...
51.2 KB  
Multimedia & Graphics  -  Lightning Brain TextStich for InDesign 1.0
Lightning Brain TextStich for InDesign plug-in helps the user to highly reduce the number of mouse clicks needed to thread together multi-frame text flows. Two threading methods are provided: 'Quick Stitch' which allows threading of frames in...
1.1 MB  
Scientific and Engineering  -  Factorial 1.2
This code gets factorial of a number and for negative numbers returns 1.The recursive implementation of factorial is easy but using lambda keyword of python it becomes a bit tough as we can't use conditional if else in lambda. If a user wants to...
 
Development Tools  -  FreeBASIC 0.18.5b 1.0
FreeBASIC is aá 32-bit BASIC compiler, with syntax similar to MS-QuickBASIC, that adds new features such as pointers, unsigned data types, inline assembly, object orientation, and many others.Features: - A large number of variable types available...
 
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  wpCache┬« WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB