🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.python
Article #27080

Re: Multiprocessing i timeout

#27080
From: Łukasz Rekucki
Date: Mon, 21 Dec 2009 16:30
16 lines
2037 bytes
On Dec 21, 4:35 pm, Bart Ogryczak <b.ogryc...@gmail.com> wrote:
> On Dec 21, 4:06 pm, królewna <krole...@ee.pl> wrote:
>
> > Czy jest jakaś możliwość aby multiprocessing.connection.Client podczas
> > tworzenia połączenia miał podawany parametr działający na zasadzie
> > timeout?
>
> Może klasycznie uniksowe rozwiązanie:
>
> http://www.python.org/doc/2.6.4/library/signal.html#example

Jak widać nie pomyśleli o tym, ale można użyć
http://docs.python.org/library/socket.html#socket.setdefaulttimeout
tuż przed wywołaniem Client(). Powinno to ustawić timeout na sockecie,
który stworzy SocketClient(). PipeClient() wydaje się mieć ustawiony
na sztywno timeout 1000ms.
Technical Details
Message-ID: <5e45a27a-4515-40c1-b098-f5f2724be64c@r24g2000yqd.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news.nask.pl!news.nask.org.pl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!r24g2000yqd.googlegroups.com!not-for-mail
References: <hgo2tn$d8r$2@achot.icm.edu.pl> <6257a74b-fcb0-4c64-843f-d13c1e5931e9@r5g2000yqb.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news.nask.pl!news.nask.org.pl!newsfeed00.sul.t-online.de!t-online.de!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!r24g2000yqd.googlegroups.com!not-for-mail
From: Łukasz Rekucki <lrekucki@gmail.com>
Newsgroups: pl.comp.lang.python
Subject: Re: Multiprocessing i timeout
Date: Mon, 21 Dec 2009 08:30:17 -0800 (PST)
Organization: http://groups.google.com
Lines: 19
Message-ID: <5e45a27a-4515-40c1-b098-f5f2724be64c@r24g2000yqd.googlegroups.com>
References: <hgo2tn$d8r$2@achot.icm.edu.pl> <6257a74b-fcb0-4c64-843f-d13c1e5931e9@r5g2000yqb.googlegroups.com>
NNTP-Posting-Host: 212.76.62.207
Mime-Version: 1.0
X-Trace: posting.google.com 1261413017 17838 127.0.0.1 (21 Dec 2009 16:30:17 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 21 Dec 2009 16:30:17 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r24g2000yqd.googlegroups.com; posting-host=212.76.62.207;  posting-account=5fpXZwoAAADF-CUdCuJ-FpYxG8__-wRx
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US)  AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.43 Safari/532.5,gzip(gfe),gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit