develooper Front page | perl.ithreads | Postings from January 2008

RE: Invoking method in other thread context

Thread Previous
Jan Dubois
January 8, 2008 13:40
RE: Invoking method in other thread context
Message ID:
On Tue, 08 Jan 2008, Shmuel Fomberg wrote:
> I am currently playing with C#. It have a nice feature that one thread can
> call a function in other thread's context. (using the Invoke command, or the
> asynchronic BeginInvoke command)
> This is useful especially in a GUI program, where one thread is handling the
> GUI, and worker threads need to post status.
> So how do we do it in Perl?
> Sending signal and relaying the command somehow?

All cross-thread communication with GUI threads should use the Windows message
queue.  Check your GUI library for an interface to the PostMessage() API to
send notifications from the worker thread to the GUI thread.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About