On Tuesday, 19 August 2003 15:01:01 UTC+12, Marcus Liddle wrote:
>
>
> Hi
>
> I'm trying to get a really simple python program to
> run a bash testing script and kill itself if its
> been running to long (ie infinite loop)
>
> create the thread object - test = TestThread()
> run the comman
Am 10.08.2012 15:01, schrieb loial:
I am writing an application to send data to a printer port(9100) and
then recieve PJL responses back on that port. Because of the way PJL
works I have to do both in the same process(script).
If I understand that right, you are opening a TCP connection, so
ob
On 2012-08-10, loial wrote:
> At the moment I do not start to read responses until the data has
> been sent to the printer. However it seems I am missing some
> responses from the printer whilst sending the data, so I need to be
> able to do the 2 things at the same time.
>
> Can I open a port on
A select() loop should work.
On Fri, Aug 10, 2012 at 1:01 PM, loial wrote:
> I am writing an application to send data to a printer port(9100) and then
> recieve PJL responses back on that port. Because of the way PJL works I
> have to do both in the same process(script).
>
> At the moment I do n
loial writes:
> I am writing an application to send data to a printer port(9100) and then
> recieve PJL responses back on that port. Because of the way PJL works I have
> to do both in the same process(script).
>
> At the moment I do not start to read responses until the data has been sent
> t
On 18Jun2012 00:17, John O'Hagan wrote:
| On Sat, 16 Jun 2012 13:27:45 -0400
| Dennis Lee Bieber wrote:
| > Not "after each event is read" but when a new event is
| > generated/inserted. The list is not a FIFO where new events are added to
| > the end, but more of a priority queue where the l
On Sat, 16 Jun 2012 13:27:45 -0400
Dennis Lee Bieber wrote:
> On Sat, 16 Jun 2012 20:01:12 +1000, John O'Hagan
> declaimed the following in
> gmane.comp.python.general:
>
> >
> > That looks like a possible way to do all the streams in a single thread,
> > although it works a little differently
On Fri, 15 Jun 2012 16:34:57 -0400
Dennis Lee Bieber wrote:
> On Sat, 16 Jun 2012 03:24:13 +1000, John O'Hagan
> declaimed the following in
> gmane.comp.python.general:
>
>
> > I should have made it clear that I'm not using threads to speed anything up;
> > each thread produces an independentl
> > > My question is, on a single core machine, what are the pros and cons of
> > > threads vs subprocesses in a setup like this?
> > >
> [...]
> >
> > Two key phrases in your message; CPU-intensive,
> > single-core-machine. If these have the conventional meaning, you're
> > better off doing all
On Fri, 15 Jun 2012 11:51:01 -0400
Dave Angel wrote:
> On 06/15/2012 09:49 AM, John O'Hagan wrote:
> > I have a program in which the main thread launches a number of CPU-intensive
> > worker threads. For each worker thread two python subprocesses are started,
[...]
> >
> > So far so good, but it
On 06/15/2012 09:49 AM, John O'Hagan wrote:
> I have a program in which the main thread launches a number of CPU-intensive
> worker threads. For each worker thread two python subprocesses are started,
> each of which runs in its own terminal: one displays output received from the
> worker thread vi
On 02/04/2012 12:23, Steven D'Aprano wrote:
On Mon, 02 Apr 2012 03:16:26 -0700, Paul Rubin wrote:
Robert Kern writes:
I also don't see these on GMane. It's possible that they are getting
caught in one of GMane's several levels of spam filtering.
I'm seeing some weird issues where google gro
On Mon, 02 Apr 2012 03:16:26 -0700, Paul Rubin wrote:
> Robert Kern writes:
>> I also don't see these on GMane. It's possible that they are getting
>> caught in one of GMane's several levels of spam filtering.
>
> I'm seeing some weird issues where google groups posts on another
> newsgroup aren
Robert Kern writes:
> I also don't see these on GMane. It's possible that they are getting
> caught in one of GMane's several levels of spam filtering.
I'm seeing some weird issues where google groups posts on another
newsgroup aren't making it to the non-google nntp server that I use.
The parano
On 3/31/12 1:47 AM, Mark Lawrence wrote:
I went onto google groups to do a search and saw three threads (there may be
more) that I've never seen on gmane, which I read via thunderbird on windows.
The titles are "Is programming art or science", "breezypythongui: A New Toolkit
for Easy GUIs in Pyth
Mark Lawrence writes:
> I went onto google groups to do a search and saw three threads (there
> may be more) that I've never seen on gmane, which I read via
> thunderbird on windows. The titles are "Is programming art or
> science", "breezypythongui: A New Toolkit for Easy GUIs in Python" and
>
On 2011-09-01, Stephen Hansen wrote:
> On 9/1/11 2:45 PM, George Kovoor wrote:
>> Why doesn't python threads show an associated PID? On spawning
>> python threads using the threading module I can only see the main
>> thread's pid on using top or ps unix command, no subprocesses are
>> displayed.
On 01Sep2011 15:27, Stephen Hansen wrote:
| On 9/1/11 2:45 PM, George Kovoor wrote:
| > Why doesn't python threads show an associated PID? On spawning python
| > threads using the threading module I can only see the main thread's pid on
| > using top or ps unix command, no subprocesses are displ
On 9/1/11 2:45 PM, George Kovoor wrote:
> Hi,
> Why doesn't python threads show an associated PID? On spawning python
> threads using the threading module I can only see the main thread's pid on
> using top or ps unix command, no subprocesses are displayed. In otherwords
> top or ps in not aware
You can also use multiprocessing module instead of threads. Use pipe
and gobject.idle_add(somefunc) to process data from other thread.
--
With best regards,
Daniel Kluev
--
http://mail.python.org/mailman/listinfo/python-list
On 14/05/11 14:12, Andy Baxter wrote:
Hi,
I'm working on adding a Gtk GUI to a python program. Its main function
is to read raw data from an arduino board over USB, and convert it to
MIDI note/controller events to be sent to another program. I've had it
working fine with just a command line i
On 14/05/11 14:12, Andy Baxter wrote:
Hi,
I'm working on adding a Gtk GUI to a python program. Its main function
is to read raw data from an arduino board over USB, and convert it to
MIDI note/controller events to be sent to another program. I've had it
working fine with just a command line i
Thanks, this should work.
On 3/25/10, Tim Golden wrote:
> On 25/03/2010 02:31, Alex Hall wrote:
>> Okay, I have my program and it has three different modes (there will
>> be more than that). Each mode will have a timer attached to it. If the
>> mode remains active and the timer runs out, a functi
On 25/03/2010 02:31, Alex Hall wrote:
Okay, I have my program and it has three different modes (there will
be more than that). Each mode will have a timer attached to it. If the
mode remains active and the timer runs out, a function specific to
that mode is called. If that mode is switched away f
En Fri, 31 Jul 2009 14:42:29 -0300, NighterNet
escribió:
On Jul 31, 10:23 am, "Gabriel Genellina"
wrote:
En Fri, 31 Jul 2009 13:35:10 -0300, NighterNet
escribió:
> I been trying to find a way to check the socket is open or not. The
> thread are in a group and loop if the sockets are open
On Jul 31, 10:23 am, "Gabriel Genellina"
wrote:
> En Fri, 31 Jul 2009 13:35:10 -0300, NighterNet
> escribió:
>
> > I been trying to find a way to check the socket is open or not. The
> > thread are in a group and loop if the sockets are open. If they are
> > not open delete the thread and remov
On 7/31/2009 12:35 PM, NighterNet wrote:
I been trying to find a way to check the socket is open or not. The
thread are in a group and loop if the sockets are open. If they are
not open delete the thread and remove the group. I need on this.
Being a bit more specific would help.
Are you using t
En Fri, 31 Jul 2009 13:35:10 -0300, NighterNet
escribió:
I been trying to find a way to check the socket is open or not. The
thread are in a group and loop if the sockets are open. If they are
not open delete the thread and remove the group. I need on this.
What means an "open socket"? Do y
En Fri, 08 May 2009 18:06:02 -0300, Jeffrey Barish
escribió:
I have a program that uses threading.Timer to execute a function after a
delay. It works fine when I run the program normally, but when I run the
program as a daemon process, I can't find any evidence that the function
ever runs.
On Mar 20, 4:21 am, Tim Rowe wrote:
> > Thank you for your response. I did not realize that. That seems like a
> > huge limitation for such a great language.
> > I will look into forking off processes instead of using threads.
>
> If that's what you need to do, yes it is. If it isn't, no it's not.
> Thank you for your response. I did not realize that. That seems like a
> huge limitation for such a great language.
> I will look into forking off processes instead of using threads.
If that's what you need to do, yes it is. If it isn't, no it's not. No
language is optimum for all possible appli
On Mar 19, 10:35 am, Jean-Paul Calderone wrote:
> On Thu, 19 Mar 2009 09:50:51 -0700, Ryan Rosario
> wrote:
> >I have a parser that needs to process 7 million files. After running
> >for 2 days, it had only processed 1.5 million. I want this script to
> >parse several files at once by using mult
On Thu, 19 Mar 2009 09:50:51 -0700, Ryan Rosario wrote:
I have a parser that needs to process 7 million files. After running
for 2 days, it had only processed 1.5 million. I want this script to
parse several files at once by using multiple threads: one for each
file currently being analyzed.
T
On Mar 19, 9:50 am, Ryan Rosario wrote:
> I have a parser that needs to process 7 million files. After running
> for 2 days, it had only processed 1.5 million. I want this script to
> parse several files at once by using multiple threads: one for each
> file currently being analyzed.
>
> My code i
On Mar 14, 3:01 am, "Gabriel Genellina"
wrote:
> En Fri, 13 Mar 2009 19:07:46 -0200, aiwarrior
> escribió:
>
> > I recently am meddling with threads and wanted to make a threaded
> > class that instead of processing anything just retrieves data from a
> > file and returns that data to a main th
In message <302dd4f5-e9b3-4b0a-b80c-
ae43810d8...@e18g2000yqo.googlegroups.com>, aiwarrior wrote:
> I recently am meddling with threads and wanted to make a threaded
> class that instead of processing anything just retrieves data from a
> file and returns that data to a main thread that takes all
En Fri, 13 Mar 2009 19:07:46 -0200, aiwarrior
escribió:
I recently am meddling with threads and wanted to make a threaded
class that instead of processing anything just retrieves data from a
file and returns that data to a main thread that takes all the
gathered data and concatenates it seque
On 17 Feb, 02:53, Mamahita Sela wrote:
> Dear FB,
>
> > As you have been already told, join() blocks until the
> > thread is
> > terminated. and you should avoid that.
> > A simple fix could by add a timeout to t.join, doing
> > something like :
> > t.join(JOIN_TIMEOUT);
> > if not
Philip Semanchuk wrote:
> The general rule is that it is a lot easier to share data between
> threads than between processes. The multiprocessing library makes the
> latter easier but is only part of the standard library in Python >= 2.6.
> The design of your application matters a lot. For instance
On Feb 17, 2009, at 10:18 AM, Barak, Ron wrote:
I have a wxPython application that builds an internal database from
a list of files and then displays various aspects of that data,
in response to user's requests.
I want to add a module that finds events in a set of log files
(LogManager).
T
Dear FB,
> As you have been already told, join() blocks until the
> thread is
> terminated. and you should avoid that.
> A simple fix could by add a timeout to t.join, doing
> something like :
> t.join(JOIN_TIMEOUT);
> if not t.isAlive():
> print t.result
>
Thanks for
On 16 Feb, 14:47, Mamahita Sela wrote:
> Dear All,
>
> I have read several howtos for threading in PyGTK. I have tried some but with
> no luck.
>
> What i want is: i can keep typing in gtk.TextView while periodically doing
> ping some hosts.
>
> I think, the thread part is working since i can pi
On Mon, 16 Feb 2009 05:47:22 -0800 (PST), Mamahita Sela
wrote:
Dear All,
I have read several howtos for threading in PyGTK. I have tried some but with
no luck.
What i want is: i can keep typing in gtk.TextView while periodically doing ping
some hosts.
You don't need threads for this. The
On Mon, Dec 22, 2008 at 11:36 AM, Thomas Raef wrote:
> I now want to run multiple instances of this program on a client, after
> receiving the command line and args from a broker, dispatcher, whatever you
> want to call it.
You can use the subprocess module.
> I've read where forks will run prog
Jeff <[EMAIL PROTECTED]>:
> (and possibly intermediate results)
These could be stored purely in C space, without refcounting needed.
--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
--
http://mail.python.org/mailman/listinfo/python-list
> However, I assumed that calls to (thread safe) C Library functions
> release the global interpreter lock.
This is mainly applicable to external C libraries. The interface to
them may not be thread-safe; anything that uses the Python API to
create/manage Python objects will require use of the GI
Hi
Ok, if I understand between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS
is not possible use a C/Python api functions ?
Sorry, but when thread enter another time with Py_END_ALLOW_THREADS this
thread enter to competition to lock GIL ?
Thks
Thks
On Thu, Jun 26, 2008 at 12:16 PM, Matthieu
Hi,
The C-API uses references counts as well, so it is not threadsafe.
Matthieu
2008/6/26 Pau Freixes <[EMAIL PROTECTED]>:
> But Python C-API[1] it's the main base for extent python with C/c++, and
> this is not not threadsafe.? I dont understand
>
> [1] http://docs.python.org/api/api.html
>
> O
But Python C-API[1] it's the main base for extent python with C/c++, and
this is not not threadsafe.? I dont understand
[1] http://docs.python.org/api/api.html
On Thu, Jun 26, 2008 at 4:49 AM, Benjamin <[EMAIL PROTECTED]>
wrote:
> On Jun 25, 9:05 am, Mirko Dziadzka <[EMAIL PROTECTED]> wrote:
> >
On Jun 25, 9:05 am, Mirko Dziadzka <[EMAIL PROTECTED]> wrote:
>
> 1) Is there a reason for this?
I think it is because the Python re library uses the Python C-API
which is not threadsafe.
> 2) Is the regex library not thread-safe?
> 3) Is it possible, to release the GIL in re.match() to
> get m
In article <[EMAIL PROTECTED]>,
Mirko Dziadzka <[EMAIL PROTECTED]> wrote:
>
>I understand that the C implementation of Python use a global interpreter
>lock to avoid problems, so doing CPU bound tasks in multiple threads
>will not result in better performance on multi-CPU systems.
>
>However, I as
On May 28, 1:14 pm, [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to work out some strange (to me) behaviour that I see when
> running a python script in two different ways (I've inherited some
> code that needs to be maintained and integrated with another lump of
> code). The sample script is:
>
>
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to work out some strange (to me) behaviour that I see when
> running a python script in two different ways (I've inherited some
> code that needs to be maintained and integrated with another lump of
> code). The sample script is:
>
> # Sample script,
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import TestThread # from TestThread.py
If I use python 2.5, this doesn't happen - instead, the module ist just run.
If I use py
On May 28, 10:24 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > On May 28, 8:52 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] schrieb:
>
> >>> On May 28, 8:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECT
[EMAIL PROTECTED] schrieb:
On May 28, 8:52 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] schrieb:
On May 28, 8:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] schrieb:
Hi,
I'm trying to work out some strange (to me) behaviour that I see when
run
On May 28, 8:52 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > On May 28, 8:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] schrieb:
>
> >>> Hi,
> >>> I'm trying to work out some strange (to me) behaviour that I see when
> >>> ru
[EMAIL PROTECTED] schrieb:
On May 28, 8:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] schrieb:
Hi,
I'm trying to work out some strange (to me) behaviour that I see when
running a python script in two different ways (I've inherited some
code that needs to be maintaine
On May 28, 8:26 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > Hi,
>
> > I'm trying to work out some strange (to me) behaviour that I see when
> > running a python script in two different ways (I've inherited some
> > code that needs to be maintained and in
[EMAIL PROTECTED] schrieb:
Hi,
I'm trying to work out some strange (to me) behaviour that I see when
running a python script in two different ways (I've inherited some
code that needs to be maintained and integrated with another lump of
code). The sample script is:
# Sample script, simply creat
En Tue, 13 May 2008 20:46:51 -0300, Astan Chee <[EMAIL PROTECTED]> escribió:
Sorry, I mean functions not classes. Well, actually, one is a class and
another is a function. So when the script (its a free game btw) runs, it
instantiates the first class and somewhere in the middle of processing
the
Sorry, I mean functions not classes. Well, actually, one is a class and
another is a function. So when the script (its a free game btw) runs, it
instantiates the first class and somewhere in the middle of processing
the first class, I need to call a function as a separate thread, I also
want to
On May 13, 5:38 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 13 May 2008 06:42:13 -0300, Astan Chee <[EMAIL PROTECTED]> escribió:
>
> > I have 2 classes in python, the first one runs first and and then the
> > first one calls the second class. I want it to run the second class as
En Tue, 13 May 2008 06:42:13 -0300, Astan Chee <[EMAIL PROTECTED]> escribió:
I have 2 classes in python, the first one runs first and and then the
first one calls the second class. I want it to run the second class as a
separate thread but I want the first one to wait until the second class
En Fri, 28 Mar 2008 13:17:44 -0300, Diez B. Roggisch <[EMAIL PROTECTED]>
escribió:
> [EMAIL PROTECTED] schrieb:
>> I have an extension module that gets initialized multiple
>> times because I am using threads.
>>
>> How can this module access global state (not per-thread state) ?
>> It needs to
[EMAIL PROTECTED] schrieb:
> I have an extension module that gets initialized multiple
> times because I am using threads.
>
> How can this module access global state (not per-thread state) ?
> It needs to create a singleton.
The question is very unclear.
If you are after *not* initializing your
En Fri, 28 Mar 2008 12:25:55 -0300, <[EMAIL PROTECTED]> escribió:
> On Mar 28, 11:14 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> En Fri, 28 Mar 2008 11:51:10 -0300, <[EMAIL PROTECTED]> escribió:
>>
>> > How can this module access global state (not per-thread state) ?
>> > It needs to c
On Mar 28, 11:14 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> C global variables are global, not per-thread.
aha, a static pointer gets initialized to NULL, so I
can check if it's not NULL in the module initializer.
Thanks for jogging my brain,
Simon.
>
> --
> Gabriel Genellina
--
ht
On Mar 28, 11:14 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 28 Mar 2008 11:51:10 -0300, <[EMAIL PROTECTED]> escribió:
>
> > I have an extension module that gets initialized multiple
> > times because I am using threads.
>
> And do you want thread local variables?
no
>
> > How ca
En Fri, 28 Mar 2008 11:51:10 -0300, <[EMAIL PROTECTED]> escribió:
> I have an extension module that gets initialized multiple
> times because I am using threads.
And do you want thread local variables?
> How can this module access global state (not per-thread state) ?
> It needs to create a sing
John Nagle <[EMAIL PROTECTED]> writes:
> People did things like that to hammer threading onto operating
> systems so dumb they couldn't context switch, like
> DOS, early Windows, and MacOS through 7. Nobody does that
> any more.
I see stuff heading more the other way; here's a description of
Tim Daneliuk wrote:
> Martin v. Löwis wrote:
> Is/Was it not the case, though, that some languages present
> a threading model to the programmer that is realized in user
> space, but not in the kernel. ISTR some early implementations
> of Posix Threads that worked that way. The API was there
> a
> That's assuming that the threading implemented at the language
> level is actually realized by underlying kernel threading.
> Is/Was it not the case, though, that some languages present
> a threading model to the programmer that is realized in user
> space, but not in the kernel.
You were asking
Tim Daneliuk <[EMAIL PROTECTED]> writes:
> 'Not trying to start a fight here, I'm just curious about the
> current state of that art. It is the case today that all
> modern language threading is realized over a kernel implementation
> of threading that behaves as you suggest?
Certainly not. See
Martin v. Löwis wrote:
>> I've been doing some thinking, and I've halfway convinced myself of
>> the following statement: that threads as implemented by Python (or
>> Java) are exactly equivalent to one-shot continuations in Scheme. Am
>> I right?
>
> No. In case of threads, progress can be made
> I've been doing some thinking, and I've halfway convinced myself of
> the following statement: that threads as implemented by Python (or
> Java) are exactly equivalent to one-shot continuations in Scheme. Am
> I right?
No. In case of threads, progress can be made in an overlapping
(concurrent),
On Feb 19, 8:26 pm, [EMAIL PROTECTED] wrote:
[...]
> The only thing preventing Python from being
> that language is the difficulty of integrating a macro system, n'est-
> ce pas?
Well there's logix (http://www.livelogix.net/logix/)
--
Arnaud
--
http://mail.python.org/mailman/listinfo/python-li
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>
>If that's the case, it seems threads plus hygeinic macros and a few
>primitives a la Scheme would form a solid basis upon which to build a
>programming language. The only thing preventing Python from being
>that language is the difficu
[EMAIL PROTECTED] wrote:
> I've been doing some thinking, and I've halfway convinced myself of
> the following statement: that threads as implemented by Python (or
> Java) are exactly equivalent to one-shot continuations in Scheme. Am
> I right? (I'd have asked in the scheme groups, but I feel li
vijayca wrote:
> i have written a script that spawns some threads
> all run in parallel
> now i need to stop all the threads once i press a key(example: "\n")
> how to do it...
That's a FAQ. Search this NG/ML for exhaustive discussions. The quick answer
is:
- you can't stop externally
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Flavio Preto schrieb:
> Hi,
>
> I have a doubt. Supose that i have the minimun class below:
>
> class db:
> def __init__(self):
> self.db = {}
> def read(self, key):
> return self.db[key]
> def write(self, key, value):
>
>> Why do you think they are not?
>
> Because they aren't. You even mentioned that a few operations that
> aren't atomic.
OTOH, the OP specifically asked for .append() and .pop(), which are
atomic.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
> Why do you think they are not?
Because they aren't. You even mentioned that a few operations that
aren't atomic. If operations are atomic it isn't necessarily because
of the design of the list, but the design of CPython. More
specifically the GIL. I don't mean to imply that you can't get a
multi
>> My question is -- are python list operations atomic? If they are not,
>> then I assume I need to put some mutual exclusion around the append()
>> and pop() calls ?
>
> They are not, but there is one included in the standard library:
> http://docs.python.org/dev/lib/module-Queue.html
Why do you
> My question is -- are python list operations atomic? If they are not,
> then I assume I need to put some mutual exclusion around the append()
> and pop() calls ?
They are not, but there is one included in the standard library:
http://docs.python.org/dev/lib/module-Queue.html
Matt
--
http://mai
> I have two threads that share a python list. One thread adds to the
> list with append(), the other thread removes items with pop().
>
> My question is -- are python list operations atomic?
Yes, they are in the current implementation of CPython (all versions).
Notice that not *all* operations a
On Aug 15, 1:36 pm, Scott <[EMAIL PROTECTED]> wrote:
> I have two threads that share a python list. One thread adds to the
> list with append(), the other thread removes items with pop().
>
> My question is -- are python list operations atomic? If they are not,
> then I assume I need to put some mu
are you using pygtk as well?
how are you using your threads, (just out of curiosity into the issue)
-felix
On 6/28/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
En Thu, 28 Jun 2007 15:12:53 -0300, Robert Rawlins - Think Blue
<[EMAIL PROTECTED]> escribió:
> I've got an application that seem
En Thu, 28 Jun 2007 15:12:53 -0300, Robert Rawlins - Think Blue
<[EMAIL PROTECTED]> escribió:
> I've got an application that seems to be a little bit unstable and
> freezes
> quite a bit, and I'm suspecting it's something in one of my threads
> that's
> causing the problem, when does a threa
On Jun 11, 3:34 am, geoffbache <[EMAIL PROTECTED]> wrote:
> I have a Python program (on UNIX) whose main job is to listen on a
> socket, for which I use the SocketServer module. However, I would also
> like it to be sensitive to signals received, which it isn't if it's
> listening on the socket. ("
On Jun 11, 2:08 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Mon, 11 Jun 2007 04:56:43 -0700, geoffbache <[EMAIL PROTECTED]> wrote:
>
> >> Twisted *should* be able to do this, as it uses non-blocking IO.
>
> >>http://twistedmatrix.com/trac/
>
> >Thanks for the tip. I'll take a look if no
>
> You could probably use the Asyncore stuff to do it as well (with a lot
> less stuff).
This looked interesting. But it seems the asyncore stuff operates at
the socket level,
whereas I've currently just got a standard synchronous SocketServer
and the socket
operations themselves are kind of hid
geoffbache wrote:
>> Twisted *should* be able to do this, as it uses non-blocking IO.
>>
>> http://twistedmatrix.com/trac/
>
> Thanks for the tip. I'll take a look if nobody has any better
> suggestions.
>
> It still seems to me that what I'm trying to do is essentially quite
> simple, and should
On Mon, 11 Jun 2007 04:56:43 -0700, geoffbache <[EMAIL PROTECTED]> wrote:
>
>> Twisted *should* be able to do this, as it uses non-blocking IO.
>>
>> http://twistedmatrix.com/trac/
>
>Thanks for the tip. I'll take a look if nobody has any better
>suggestions.
Twisted is a pretty good suggestion in
> Twisted *should* be able to do this, as it uses non-blocking IO.
>
> http://twistedmatrix.com/trac/
Thanks for the tip. I'll take a look if nobody has any better
suggestions.
It still seems to me that what I'm trying to do is essentially quite
simple, and shouldn't require
as large a tool as T
geoffbache wrote:
> I have a Python program (on UNIX) whose main job is to listen on a
> socket, for which I use the SocketServer module. However, I would also
> like it to be sensitive to signals received, which it isn't if it's
> listening on the socket. ("signals can only be received between ato
En Wed, 11 Apr 2007 08:36:57 -0300, A.B., Khalid <[EMAIL PROTECTED]>
escribió:
> On Apr 11, 2:38 am, [EMAIL PROTECTED] wrote:
>> I have a application where I use different threads. actually all is
>> working - BUT I just discovered that the [b]CPU is always 100 % [/
>> b]used.
>>
> You need you
On Apr 11, 1:36 pm, "A.B., Khalid" <[EMAIL PROTECTED]> wrote:
> On Apr 11, 2:38 am, [EMAIL PROTECTED] wrote:
>
>
>
> > Hi all,
>
> > I have a application where I use different threads. actually all is
> > working - BUT I just discovered that the [b]CPU is always 100 % [/
> > b]used.
>
> > on the 32
On Apr 11, 2:38 am, [EMAIL PROTECTED] wrote:
> Hi all,
>
> I have a application where I use different threads. actually all is
> working - BUT I just discovered that the [b]CPU is always 100 % [/
> b]used.
>
> on the 32-bit machine athlon XP, as well as on the amd 64-bit AMD
> Athlon(TM) 64 X2 Dual
[EMAIL PROTECTED] schrieb:
> while (True):
> pass
> Does anyone know how to run this without consuming all CPU.
Your while loop is taking all the CPU time.
Thomas
--
sinature: http://nospam.nowire.org/signature_usenet.png
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 244 matches
Mail list logo