[PD] preventing comport freezes

Roman Haefeli reduzierer at yahoo.de
Fri May 8 20:16:28 CEST 2009


On Fri, 2009-05-08 at 08:14 -0400, Martin Peach wrote:
> Hans-Christoph Steiner wrote:
> > 
> > So right now, when [comport] is open and that device gets disconnected, 
> > comport freezes and Pd crashes.  My guess is that comport is waiting and 
> > therefore blocking.  It seems like the select() call should prevent 
> > that, any other guesses on how to prevent comport from locking like 
> > this?  Many arduino users would be very happy.
> > 
> 
> Is this on linux? It should be non-blocking on Windows.
> I suppose it crashes only when you try to send something, not if you 
> just pull the cable out. I would have thought that if hardware 
> handshaking was off, the port will send anyway. I seem to remember 
> sending into an oscilloscope probe with no cable present.

> Select is problematic, as we have seen with recent [tcpserver], checking 
> if each byte can be sent before it goes out slows the whole thing down a 
> lot.
> 

i am still in the process of understanding things, that you have to deal
with, so forgive any obvious question from my side, but why is it
necessary to call select() for each single byte? wouldn't it be
sufficient to call it 'from time to time' (whatever that means)?

just out of curiosity: if there is a solution, that works well for
[tcpserver], couldn't it be applied also to [comport]?

roman  


		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de





More information about the Pd-list mailing list