Solved

multithread

Posted on 2000-03-02
4
269 Views
Last Modified: 2013-12-25
How Is it possible to make the cgi environment multithreaded? What kind of changes we need to make.  
0
Comment
Question by:seethiru
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:makerp
ID: 2576864
using win32 of unix ????

theres a win32 thread module, in active state this is still beta.  
0
 

Author Comment

by:seethiru
ID: 2577437
The question is focussed on unix.
0
 

Author Comment

by:seethiru
ID: 2577439
Adjusted points to 10
0
 
LVL 10

Accepted Solution

by:
makerp earned 10 total points
ID: 2579422
right then

two options for creating new proccess.

threads
OR
forking

forking is a bit of a more aggresive answer and takes the follwoing form

if( $pid = fork )
{
     # parent code here
     # proccess id avalibe in $pid
}
elsif
{
     # child here
     # parent processid avalible with
     # getppid()
}
else
{
     die "can fork() :".$!;
}

Threads

these are a more light wait answer but still only beta, well atleast in perl 5.005 and the perl build you have must be built for multi threading. see http://www.perl.com

# you can pass parameters to the function\sub as a second argument to the thread function.

$t = new Thread(mysub);

sub mysub()
{
     print("Heelo from mr thread");
}

this will create a new thread and the threads starting point will be mysub

there are quite a few thread functions for control etc see www.perl.com, you can get the module desciprtion etc....

hope this helps
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Recursively Delete Files 5 102
How can I save all open docs into a given folder 12 126
Automate PC's, Laptop to correct OU 4 44
Merging text files strings with filename 18 40
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to count occurrences of each item in an array.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question