non-blocking http call and glib



I'm trying to do a non blocking call to an http server with Mojo::UserAgent so that it doesn't block the Gtk GUI while it's waiting for the response. I want to do the request and once the results are back to update the GUI. I'm confused on how to do this. I'm on win32, here's the code so far. 

http://pastebin.ca/3772676

This code makes the program hang and they told me on #perl that it's because I'm using two loops, one from Gtk and one from Mojo. 
What is the correct way of doing this?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]