in reply to Threading in Perl

Yes, sorry guys. I wanted to post the code, but its pretty huge, and its Visual Perl .NET, so I didn't know if anyone would be familiar with it anyways. I think I will attempt the first response and try to use shared variables in my threads. Does anyone have a good example of doing this?

BrowserUK, I considered what you said, and I don't think that I can seperate the messages from the GUI. I really want the results to appear on the GUI. I'd like to hope that I could make the entire GUI a shared variable, .NET uses $this as a reference (or I guess it could be $self), I'd like to share $this, I guess, if that's possible, so that I could output results to the GUI, possibly add a progress bar to the GUI, etc.

I'm not sure if this is exactly possible.

Thanks for the responses!

Replies are listed 'Best First'.
Re: Re: Threading in Perl
by castaway (Parson) on Jul 30, 2003 at 07:20 UTC
    Going Up - threads article on perl.com ..

    Note: You can't share Objects using ithreads, so probably not your GUI either.

    Note2: What BrowserUK meant was to write your results to some shared variable somewhere, and get the GUI to check for them and update itself in the normal process of things.

    C.

    PS: What the h*** is Visual Perl .NET?

      Haha, its a new product from ActiveState. It works with Visual Studio .NET's framework. I decided to grab it and play with it for a little while. A friend of mine is a .NET fanatic and bought a full version of it. I actually kind of like it. Its sorta like Perl mixed with C#. I'm a Java programmer at the heart of things, so it's a better transition for me than learning Perl/Tk.

      This article looks interesting, hopefully I will find my answers there.

      You know, I have some more questions on threading, specifically, how to thread a job to multiple machines, think I should just post another question?