[purejavacomm] Re: PureJavaComm with Arduino Micro on Windows

  • From: ant elder <ant.elder@xxxxxxxxx>
  • To: purejavacomm@xxxxxxxxxxxxx
  • Date: Fri, 8 Nov 2013 19:00:02 +0000

You're a star Kusti, the CancelIoEx is indeed the problem, my shutdown
code is running on a separate thread.

I can't easily contribute the fix quickly due to my works IP
restrictions, but is there any chance you could get a release out with
that update?

Thanks again,


On Thu, Nov 7, 2013 at 1:40 PM, Kustaa Nyholm
<feedback2@xxxxxxxxxxxxxxxxx> wrote:
> On 06/11/2013 22:05, ant elder wrote:
>>   Any ideas on this one?
> Please turn on the logging to see if any of the calls inside the
> close() fails.
> It looks like it is waiting for a write to finish, do you
> have a write in progress/pending?
> Is the write in the same thread as close, obviously not if it
> is pending, so it maybe that the CancelIo inside close
> fails to cancel that.
> We should probably try to use CancelIoEx...
> you could try to modify that ... just follow the pattern of
> how the CancelIo call is implemented in WinAPI class,
> see here:
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa363792(v=vs.85).aspx
> I may check that myself, but not right now, I'm busy with
> other things.
> br Kusti

Other related posts: