[Rxtx] port in use exception
Gregg Wonderly
gergg at cox.net
Mon Sep 25 12:37:22 MDT 2006
Dr. Douglas Lyon wrote:
> Trent Jarvi Said:
>>Perhaps you are trying to open the port before the kernel is ready? Are
>>you opening right after closing? The more recent versions of rxtx may
>>close the port faster which could make a difference depending how you are
>>using threads.
An API shouldn't make a synchronous event, such as freeing a resource, into an
ansynchrous activity unless it can also mediate a rendevous of any future users
of such a resource. The normal use of open and close on resources in an
operating system is synchronous. I think it's really not a good idea to make
the close asynchronous. Some might do this to keep the application from waiting
for a flush on a slow connection, or one with stuck flow control. It really
should block the caller until the close completes, and let the calling
environment decide that their application requires asynchronous behavior.
Gregg Wonderly
More information about the Rxtx
mailing list