tip120 has asked for the wisdom of the Perl Monks concerning the following question:
Hi there,
I have a perl-curses based script that essentially connects to a web-based ajax powered chatroom. This script simply allows me to use the chatroom from within my terminal, without needing a web browser. It works, however, I have a small issue.
It seems when a web request is made, the curses UI just freezes until the request is done. I figure I can solve this by making the web requests fork off into another thread.
I've tested the code and confirmed that it only happens while waiting for the webserver to respond.
However, I'm not sure about the easiest way to fix this. I'm using LWP for my web requests. Is there an easy way to make all the LWP HTTP requests thread and return back without having to rewrite a large portion of my code? Is there an easier way to solve the issue? Any advice would appreciated. :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Threading Web Requests with LWP
by BrowserUk (Patriarch) on Aug 20, 2014 at 10:00 UTC | |
|
Re: Threading Web Requests with LWP
by Anonymous Monk on Aug 20, 2014 at 09:28 UTC |