[PerlChina] 答复: 我怎么发不了邮件到mail list

purl lamp lamp.purl at gmail.com
Wed Mar 26 06:33:53 PDT 2008


detach 子线程就可以了,不需要 join 除非有什么特别的要清理。而且 join 会导致主线程卡住。

在 08-3-24,Steven Zhu<stevenzyk at gmail.com> 写道:
> 请教一下我这个线程有关闭掉吗?不太理解perl的多线程
> 我这样的话,join能够关闭线程吗?
>
>
>
> while(1)
> {
>     $MySocket->recv($text,128);
>     if($text =~ 'username')
>     {
>         $tempcount = 0;
>
> @threads[$tempcount]=threads->new(\&start_thread,$MySocket);
>         $tempcount++;
>          print "\nReceived message '", $text,"'\n";
>     }
> }
>
>  foreach my $thread (@threads) {
>  print "end\n";
>  $thread->join();
> }
> sub start_thread{
>       执行程序;
> }
>
>
>
> 在08-3-23,bruce cheng <bruce1914 at gmail.com> 写道:
>
> > 发邮件列表自己是收不到的。
> >
> > 不知道能不能改进下。
> >
> > > -----邮件原件-----
> > > 发件人: china-pm-bounces+bruce1914=gmail.com at pm.org
> > > [mailto:china-pm-bounces+bruce1914=gmail.com at pm.org] 代表
> purl lamp
> > > 发送时间: 2008年3月23日 18:16
> > > 收件人: china-pm at pm.org
> > > 主题: Re: [PerlChina] 我怎么发不了邮件到mail list
> > >
> > > you have made it :D
> > >
> > > 在 08-3-23,gary.jsz<gary.jsz at gmail.com> 写道:
> > > >
> > > >
> > > > 奇怪,try again
> > > >
> > > >  ________________________________
> > > >
> > > > 蒋士竹
> > > > _______________________________________________
> > > >  China-pm mailing list
> > > >  China-pm at pm.org
> > > >  http://mail.pm.org/mailman/listinfo/china-pm
> > > >
> > > _______________________________________________
> > > China-pm mailing list
> > > China-pm at pm.org
> > > http://mail.pm.org/mailman/listinfo/china-pm
> >
> > _______________________________________________
> > China-pm mailing list
> > China-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/china-pm
>
>
>
> --
> BR
> Steven.zhu
> _______________________________________________
>  China-pm mailing list
>  China-pm at pm.org
>  http://mail.pm.org/mailman/listinfo/china-pm
>


More information about the China-pm mailing list