geoff.ba...@gmail.com writes:
> I have a multithreaded application using an embedded Python 3.6.4 (upgraded
> from 3.6.2 today in the hope that the problem was now solved: it doesn't seem
> to be). The standard library is in a zip file. So long as only one thread is
> running Python at a time i
On Thursday, 21 December 2017 00:33:54 UTC+1, Lawrence D’Oliveiro wrote:
> On Thursday, December 21, 2017 at 5:13:33 AM UTC+13, geoff...@gmail.com wrote:
> >
> > I have a multithreaded application using an embedded Python 3.6.4 ...
>
> Avoid multithreading if you can. Is your application CPU-bou
Hi all,
I have a multithreaded application using an embedded Python 3.6.4 (upgraded
from 3.6.2 today in the hope that the problem was now solved: it doesn't seem
to be). The standard library is in a zip file. So long as only one thread is
running Python at a time it seems to work fine. But ther
You may have some issues with disk reading as the drive heads move in
different ways
On Mon, Nov 21, 2011 at 8:15 AM, wrote:
> Hi All,
>
> ** **
>
> Just a question in general. Is it possible that we have opened one file
> in r+ mode ( file1.txt ).
>
> We have 2 threads,
>
> **·
Hi All,
Just a question in general. Is it possible that we have opened one file in r+
mode ( file1.txt ).
We have 2 threads,
* Thread1 will continuously 'only read' the file in a loop.
* Thread2 will only update the data in the file ( say a number < 100 ).
Now thread2 has ca
On Wed, Nov 16, 2011 at 6:30 PM, Dave Angel wrote:
> On 11/16/2011 01:22 PM, Dave Angel wrote:
>
>> (You're top-posting. Put your remarks AFTER what you're quoting)
>>
>> On 11/16/2011 12:52 PM, Jack Keegan wrote:
>>
>>> Ok, I thought that processes would do the same job as threads. So would
>>>
You can see an example on how to use multiprocessing.Pool at
http://pythonwise.blogspot.com/2011/03/convert-oggs-to-mp3-fast-way.html
This is ogg -> mp3 but the same idea.
--
http://mail.python.org/mailman/listinfo/python-list
On 11/16/2011 01:22 PM, Dave Angel wrote:
(You're top-posting. Put your remarks AFTER what you're quoting)
On 11/16/2011 12:52 PM, Jack Keegan wrote:
Ok, I thought that processes would do the same job as threads. So
would the
general rule be some thing like so:
If I want another piece of wor
containers
that provide other things (fds, separate address space, etc.). The
comment about multiple cores can be extended to multiple threads on a
core (CMT) but applies to threads as well as processes. Switching
between processes tends to be heavier weight then switching between
threads in a process
other things (fds, separate address space, etc.). The
comment about multiple cores can be extended to multiple threads on a
core (CMT) but applies to threads as well as processes. Switching
between processes tends to be heavier weight then switching between
threads in a process because of the n
On 11/16/2011 12:00 PM, Jack Keegan wrote:
Hi Chris,
On Wed, Nov 16, 2011 at 1:55 PM, Chris Angelico wrote:
First off, it's better in CPython (the most popular Python) to use
multiple processes than multiple threads.
I had been looking into treads and process/subprocess myself a whil
Hi Chris,
On Wed, Nov 16, 2011 at 1:55 PM, Chris Angelico wrote:
> First off, it's better in CPython (the most popular Python) to use
> multiple processes than multiple threads.
I had been looking into treads and process/subprocess myself a while ago
and couldn't decide which
Am 16.11.2011 14:48 schrieb Eduardo Oliva:
Hello, I have a py script that reads for all "m2ts" video files and convert them to
"mpeg" using ffmpeg with command line.
What I want to do is:
I need my script to run 2 separated threads, and then when the first has
finished, starts the next one
Am 16.11.2011 14:48, schrieb Eduardo Oliva:
> Hello, I have a py script that reads for all "m2ts" video files and convert
> them to "mpeg" using ffmpeg with command line.
>
> What I want to do is:
>
> I need my script to run 2 separated threads, and then when the first has
> finished, starts
On 16.11.2011 14:48, Eduardo Oliva wrote:
> I need my script to run 2 separated threads, and then when the first has
> finished, starts the next onebut no more than 2 threads.
> I know that Semaphores would help with that.
> But the problem here is to know when the thread has finished i
27;s better in CPython (the most popular Python) to use
multiple processes than multiple threads. That aside, what you're
looking at is a pretty common model - a large number of tasks being
served by a pool of workers.
Have a look at the multiprocessing module, specifically Pool:
Version 2: h
Hello, I have a py script that reads for all "m2ts" video files and convert
them to "mpeg" using ffmpeg with command line.
What I want to do is:
I need my script to run 2 separated threads, and then when the first has
finished, starts the next onebut no more than 2 threads.
I know that
Hi John,
"John Nagle" wrote in message
news:4c75768a$0$1608$742ec...@news.sonic.net...
You don't need a queue, though; just use your own "write" function
with a lock.
Hmm... that would certainly work. I suppose it's even more efficient than a
queue in that the first thing the queue is
On 8/25/2010 11:36 AM, Joel Koltner wrote:
I have a multi-threaded application where several of the threads need to
write to a serial port that's being handled by pySerial. If pySerial
thread-safe in the sense that pySerial.write behaves atomically? I.e.,
if thread 1 executes, serport.write("Hell
"Thomas Jollans" wrote in message
news:mailman.36.1282762569.29448.python-l...@python.org...
I expect that it gives away the GIL to call the resident write() function,
to
allow other threads to run while it's sitting there, blocking. I haven't
looked at the code, so maybe it doesn't hand over t
On 25/08/2010 19:36, Joel Koltner wrote:
I have a multi-threaded application where several of the threads need to
write to a serial port that's being handled by pySerial. If pySerial
thread-safe in the sense that pySerial.write behaves atomically? I.e.,
if thread 1 executes, serport.write("Hello,
On Wednesday 25 August 2010, it occurred to Joel Koltner to exclaim:
> I have a multi-threaded application where several of the threads need to
> write to a serial port that's being handled by pySerial. If pySerial
> thread-safe in the sense that pySerial.write behaves atomically? I.e., if
> thre
I have a multi-threaded application where several of the threads need to write
to a serial port that's being handled by pySerial. If pySerial thread-safe in
the sense that pySerial.write behaves atomically? I.e., if thread 1 executes,
serport.write("Hello, world!") and thread 2 executes serpor
Thank you guys, indeed, calling join() for each thread actually solved
the problem.
I misunderstood it and call join() right after start() so it didn't
work the way I wanted.
for i in range(args.threads):
children[i].join()
--
http://mail.python.org/mailman/listinfo/python-list
Hi
On Nov 9, 8:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I am trying to put up a queue (through a logging thread) so that all
> worker threads can ask it to log messages.
There is no need to do anything like this, the logging module is
thread safe and you can happily just create log
On Nov 8, 10:52 pm, [EMAIL PROTECTED] wrote:
> OS: Solaris 9
> Python Version: 2.4.4
>
> I need to log certain data in a worker thread; however, I am getting
> an error now when I use two worker threads.
> I think the problem comes from the linelogging.info('Thread Object (%d):(%d),
> Time:%s in s
On Nov 9, 8:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I am trying to put up a queue (through aloggingthread) so that all
> worker threads can ask it to log messages. However, the problem I am
> facing is that, well, theloggingthread itself is running forever.
> It does not know when
On Nov 8, 10:52 pm, [EMAIL PROTECTED] wrote:
> OS: Solaris 9
> Python Version: 2.4.4
>
> I need to log certain data in a worker thread; however, I am getting
> an error now when I use two worker threads.
> I think the problem comes from the linelogging.info('Thread Object (%d):(%d),
> Time:%s in s
I am trying to put up a queue (through a logging thread) so that all
worker threads can ask it to log messages. However, the problem I am
facing is that, well, the logging thread itself is running forever.
It does not know when it should exit. Any suggestion? None of the
worker threads knows for
OS: Solaris 9
Python Version: 2.4.4
I need to log certain data in a worker thread; however, I am getting
an error now when I use two worker threads.
I think the problem comes from the line
logging.info('Thread Object (%d):(%d), Time:%s in seconds %d'%
(self.no,self.duration,time.ctime(),time.time(
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Tobiah
> Sent: Monday, January 07, 2008 5:24 PM
> To: python-list@python.org
> Subject: 'Borg' and multiple threads.
>
> I have a class that I call Borg that
Hi,
On Jan 8, 2008 7:24 AM, Tobiah <[EMAIL PROTECTED]> wrote:
> I have a class that I call Borg that starts like this:
>
> class Borg(dict):
>
> static_state = {}
> def __init__(self):
> self.__dict__ = self.static_state
>
>
> so that I can access the same data from
I have a class that I call Borg that starts like this:
class Borg(dict):
static_state = {}
def __init__(self):
self.__dict__ = self.static_state
so that I can access the same data from anywhere within
any module or function just by instantiating one.
This is use
ent is:
I want to have two worker threads and each one notifies the main thread. It
could be possible that when a worker thread is running, other might be
tirggerd.
1) Can I do with only one Worker thread class?
2) Can there be only one notification function for multiple threads.
*CODE:*
**
impor
Is it possible to use PyUnit to test with multiple threads?
I want to send many commands to a database at the same time. The order
of execution of the commands is indeterminate, and therefore, so is
the status message returned.
For example, say that I send the commands "get" and &quo
Hi all. Because of pcapy sniffng library doesn't permit to listen on
multiple interfaces I'm trying to use threads to avoid this problem.
In the source below I tried to start a thread for every NIC installed on my
system (I got 2 NICs) but once I started the first thread the program can't
go fur
Jp Calderone <[EMAIL PROTECTED]> writes:
> >Secondly, I don't know about wxPython, but in tkinter you have to
> >resort to a kludge in order for the gui thread to handle gui events
> >and also notice stuff on a queue. There's a tkinter command to run
> >some function after a specified time (say 50
"fo" <[EMAIL PROTECTED]> writes:
> Thanks for the replies. I have a Queue object in the main GUI thread,
> this gets passed to all the worker threads and they add items to it.
> This is all well and good, but what is a good way to get the GUI thread
> to send items back to the worker threads?
Thanks for the replies. I have a Queue object in the main GUI thread,
this gets passed to all the worker threads and they add items to it.
This is all well and good, but what is a good way to get the GUI thread
to send items back to the worker threads?
--
http://mail.python.org/mailman/listinfo/p
Look inthe demo that comes with wxPython it is in tree process and
events -> threads .
There is a nice demo of PostEvent().
Another way would be to use Queues as others have mention .
You can create a new frame and have it call the queue for data.
M.E.Farmer
--
http://mail.python.org/mailman/li
"fo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This is a network app, written in wxPython and the socket module. This
> is what I want to happen:
I'm not sure if this will help you, but it solved what was, for me, a
more general problem: not (normally) being able to issue w
On 01 May 2005 10:09:56 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote:
"fo" <[EMAIL PROTECTED]> writes:
How would I get the worker thread to open a GUI window in the main GUI
thread? After that GUI window is open, how can I send and recv messages
from/to the GUI window?
First of all
"fo" <[EMAIL PROTECTED]> writes:
> How would I get the worker thread to open a GUI window in the main GUI
> thread? After that GUI window is open, how can I send and recv messages
> from/to the GUI window?
First of all the favorite Pythonic way to communicate between threads
is with synchroniz
This is a network app, written in wxPython and the socket module. This
is what I want to happen:
GUI app starts. User clicks a button to 'start' the work of the app.
When start is pressed, a new thread is spawned (threading module) and
this thread starts listening for data on a socket. When someon
Hi Carlos,
I looked in the source code for pylibpcap, and it does not release the
GIL, hence my problem.
I found a solution though, the pcap object has a fileno member so I
could use select to wait for a packet, then call loop without blocking.
Problem solved! :)
And since it is only a thin wr
On Mon, 24 Jan 2005 15:18:39 +0100, Örjan Gustavsson
<[EMAIL PROTECTED]> wrote:
> Hi All!
>
> Sorry if this is not the correct forum for this kind of question (I did
> not find any pylibpcap related lists).
>
> I am trying to use pylibpcap to capture network traffic from several
> ethernet device
Hi All!
Sorry if this is not the correct forum for this kind of question (I did
not find any pylibpcap related lists).
I am trying to use pylibpcap to capture network traffic from several
ethernet devices at the same time, each nic having a separate thread
assigned to it.
My problem is that wh
47 matches
Mail list logo