Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Simultaneous request using threading

by stiller (Friar)
on Apr 11, 2008 at 07:50 UTC ( #679632=note: print w/replies, xml ) Need Help??

in reply to Simultaneous request using threading

- Is threading the appropriate tool to use or should I use fork instead?
I tend to prefer fork, but threads might be ok

if the server's maximum number of simultaneous requests is set to 10, If the script is not interrupted I should not be able to access the server using my browser right?
No. The server will serve up to ten requests at any time. But it won't take long to serve login.php, and once it's done with that, a slot is freed, for the next request to come in. You with a browser, or your 10-thread script might be the next to be served.

- Memory wise, is there any way I can alleviate the memory usage?
If you think your threaded script use much memory, try with forking. I think that forking usually consumes less memory, but I don't know if that is universally true, or if it's improved in 5.10
  • Comment on Re: Simultaneous request using threading

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://679632]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2018-01-21 03:42 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.