You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by keeper <da...@yandex.ru> on 2007/12/24 21:26:17 UTC

MINA 2 Serial COM port writing

Hello!
In my project I use MINA2 for interaction with device by serial COM port.
I'm interesting in next question: How session wich connectred with single
COM port will behave, in case several threads write in it simulatneously?
In other words, if writing in session is threadsafe, after two callings of
function 'write' two packets in turn, from one and another packet, will go
on wire. If the write() calling isn't threadsafe, whether bytes of packets
will be mixed?
-- 
View this message in context: http://www.nabble.com/MINA-2-Serial-COM-port-writing-tp14491036s16868p14491036.html
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: MINA 2 Serial COM port writing

Posted by Julien Vermillard <jv...@archean.fr>.
On Mon, 24 Dec 2007 12:26:17 -0800 (PST)
keeper <da...@yandex.ru> wrote:

> 
> Hello!
> In my project I use MINA2 for interaction with device by serial COM
> port. I'm interesting in next question: How session wich connectred
> with single COM port will behave, in case several threads write in it
> simulatneously? In other words, if writing in session is threadsafe,
> after two callings of function 'write' two packets in turn, from one
> and another packet, will go on wire. If the write() calling isn't
> threadsafe, whether bytes of packets will be mixed?

Hi,
sorry for the late reply I was on holidays.

It's thread safe to call session.write. If not please fill a bug report
on JIRA and it will be fixed ASAP.

Julien