gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gpsd Reliable and resilient tcp feed


From: Greg Troxel
Subject: Re: gpsd Reliable and resilient tcp feed
Date: Fri, 24 Sep 2021 11:36:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix)

Nick Taylor <nicktaylor@dataskill.uk> writes:

> Attached please find our patch as it is so far, together with debug
> log showing where the tcp connect hangs...
>
> Obviously there are a number of possible solutions for example:
>
> - set timeout on the tcp connect
>
> - use non blocking connect
>
> - use async connect

To me, the important thing is to get the non-blocking behavior you want
without impacting portability of the code.  That means not using
facities not specified by POSIX.

For nonblocking, there are basically two approache:
  threads
  async style

So I would want to look into gpsd and if it is using threads, and if so
how.  On my system it's linked with threads, and a quick grep says it
uses threads.  If that's ~always true, that's your answer I'd say.

That means the source needs to have an async connect that runs in a
thread, with enough locking of the data structure (or a pointer that is
believed atomic) that it can be set from the connect.

There may be other issues about sources  coming and going, but maybe
not.

This fix would be good for remote RTCM feeds too.

Of course see who else says something.


Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]