Re: PerlQt and threads

Roy Souther <[email protected]> Mon, 10 Dec 2007 15:10:47 -0700
Newsgroups gmane.comp.kde.devel.perl
Organization Silicon Tao Technology Systems Inc.
Message-ID <1197324647.23728.153.camel@serverlink>
--===============0964248437==
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-c3hqwqpB0BR2cZzyli4l"


--=-c3hqwqpB0BR2cZzyli4l
Content-Type: multipart/alternative; boundary="=-io421REGvHl9Qd7p4HXO"


--=-io421REGvHl9Qd7p4HXO
Content-Type: text/plain; charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable

I am the moderator for the PerlQt list. Your message was held back
because your sending email address is not in the list. This is to
protect our members from SPAM. Sorry for the delay.

I have not used threads in Perl but I would expect it to be logically
the same as threads in C++. I would expect that the $window variable is
out of scope and cannot be access by the thread. I would advice you to
use a call back from the child thread to the parent thread that asks the
parent thread that does have $window in scope to show the window by
proxy.

You will need to lookup how to do callbacks in Perl, I don't have an
example for that but I am sure it can be done.

On Tue, 2007-12-04 at 15:52 +0100, Rafa=B3 Grzegorz S=B3awik wrote:

> Hello
>=20
> I have some problem: How can I open new window (from thread)?
> When I try to do $window->show; I get error "Xlib: unexpected async reply=
". Is=20
> there any solution to solve this problem?
> [I have already opened one window.]
>=20


Royce Souther
www.SiliconTao.com
Let Open Source help your business move beyond.

For security this message is digitally authenticated by GnuPG.




--=-io421REGvHl9Qd7p4HXO
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; CHARSET=3DUTF-8">
  <META NAME=3D"GENERATOR" CONTENT=3D"GtkHTML/3.2.5">
</HEAD>
<BODY>
I am the moderator for the PerlQt list. Your message was held back because =
your sending email address is not in the list. This is to protect our membe=
rs from SPAM. Sorry for the delay.<BR>
<BR>
I have not used threads in Perl but I would expect it to be logically the s=
ame as threads in C++. I would expect that the $window variable is out of s=
cope and cannot be access by the thread. I would advice you to use a call b=
ack from the child thread to the parent thread that asks the parent thread =
that does have $window in scope to show the window by proxy.<BR>
<BR>
You will need to lookup how to do callbacks in Perl, I don't have an exampl=
e for that but I am sure it can be done.<BR>
<BR>
On Tue, 2007-12-04 at 15:52 +0100, Rafa&#322; Grzegorz S&#322;awik wrote:
<BLOCKQUOTE TYPE=3DCITE>
<PRE>
<FONT COLOR=3D"#000000">Hello</FONT>

<FONT COLOR=3D"#000000">I have some problem: How can I open new window (fro=
m thread)?</FONT>
<FONT COLOR=3D"#000000">When I try to do $window-&gt;show; I get error &quo=
t;Xlib: unexpected async reply&quot;. Is </FONT>
<FONT COLOR=3D"#000000">there any solution to solve this problem?</FONT>
<FONT COLOR=3D"#000000">[I have already opened one window.]</FONT>

</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING=3D"0" CELLPADDING=3D"0" WIDTH=3D"100%">
<TR>
<TD>
<BR>
<TABLE CELLSPACING=3D"0" CELLPADDING=3D"0" WIDTH=3D"100%">
<TR>
<TD>
<U><A HREF=3D"mailto:[email protected]">Royce Souther</A></U><BR>
<U><A HREF=3D"http://www.SiliconTao.com">www.SiliconTao.com</A></U><BR>
Let Open Source help your business move beyond.<BR>
<BR>
For security this message is digitally authenticated by <U><A HREF=3D"http:=
//www.gnupg.org">GnuPG</A></U>.
</TD>
</TR>
</TABLE>
<BR>
<BR>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

--=-io421REGvHl9Qd7p4HXO--

--=-c3hqwqpB0BR2cZzyli4l
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBHXblnY62fql08qicRAvrmAKCpUDsLjmAa5iZn41iWleDKnlr3sgCgnWC6
Sbwy0lhkYjKpTSVYnnEwyko=
=OBmr
-----END PGP SIGNATURE-----

--=-c3hqwqpB0BR2cZzyli4l--


--===============0964248437==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kde-perl mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-perl

--===============0964248437==--