Named pipes in threads

P

Philippe C. Martin

HI,

I currently have a "working" script that uses sockets to handle threads
communications - the problem is that it gives me obvious problems in handling
free ports (launching the script more than once ....).

Is thread named pipes communication allowed ?

Regards,

Philippe
 
M

Michael Fuhr

Philippe C. Martin said:
I currently have a "working" script that uses sockets to handle threads
communications - the problem is that it gives me obvious problems in handling
free ports (launching the script more than once ....).

Who is communicating with whom? Threads communicating with other
threads in the same process? Threads communicating with a peer
external to the process? What "obvious problems" are you having?
Is thread named pipes communication allowed ?

What happened when you tried it?

What are you trying to do? Perhaps if you backed up and described
the "what" we could make better recommendations about the "how."
 
J

Jive

Philippe C. Martin said:
HI,

I currently have a "working" script that uses sockets to handle threads
communications - the problem is that it gives me obvious problems in handling
free ports (launching the script more than once ....).

Is thread named pipes communication allowed ?

Regards,

Replace the sockets with a queue of strings.
http://docs.python.org/lib/module-Queue.html

Write your Send and Recv functions in terms of Queue.get() and Queue.put();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top