Multiple port asynchronous I/O over serialport in C#
Posted
by firoso
on Stack Overflow
See other posts from Stack Overflow
or by firoso
Published on 2009-03-23T20:38:59Z
Indexed on
2010/03/24
11:33 UTC
Read the original article
Hit count: 345
I'm trying to write a test application for serial I/O (RS-232) with multiple units in C# and I'm running into an issue with my lack of threading experience so I'm soliciting feedback for a best known method.
I've got a pool of COM ports COM1-16 each of which can read/write at any time and I need to be able to manage them simultaneously. Is this a situation for a thread pool? What is some guidance on structuring this applet?
Edit: Upon review I was wondering is I really even need to do asynchronous threads here, I could just maintain states for each COM-port and do flow logic (i.e., statemachine) for each COM-port individually.
© Stack Overflow or respective owner