in reply to Is HTTP::Proxy thread safe?

You should read the documentation (their emphasis):

An important thing to note is that the proxy is ... a forking proxy:

Update: I just realised that there is no mention of which OS you're running under, so the Win32 explanation might not be the right one for you. I think the solution remains the same though.

It forks for each new connection. Under Win32, fork is emulated using threads. That's where your "extra' threads come from.

If you want to run two forking proxies concurrently on different ports, you should probably run two separate processes per the synopsis.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^2: Is HTTP::Proxy thread safe?
by locked0wn (Acolyte) on Apr 05, 2010 at 01:01 UTC
    Thank you very much! I agree that I should run two separate processes for two proxies.

    I am running the code I provided on Debian Linux.