[Top][All Lists]

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

Re: ✘GPS 3.24 is released!

From: Gary E. Miller
Subject: Re: ✘GPS 3.24 is released!
Date: Sun, 8 May 2022 14:25:19 -0700

Yo Hal!

On Sun, 08 May 2022 13:55:32 -0700
Hal Murray <> wrote:

> > Not priviledged, but syncrhouns only.  gpsd needs to be async once
> > it is running.  Otherwise the buffers back up and game over.  
> Is the game really over?  Will the pseudo threads parsing the input
> streams recover from lost data?

What psuedo threads?

> If so, what is the value of the DNS
> lookup (or whatever) that doesn't happen often compared to the
> occasional trashing of the input stream?

A whole bunch of timeouts trigger, devices and cleitns get disconnected,
etc.  I tried and failed.  Feel free to give it a try.

> > Of course if you want convert gpsd to multhreaded operation, then
> > those problems go away.   
> I've done it for ntpd -- not real threads, just another quirk for the
> current pseudo thread scheduler to handle.  It's not hard, at least
> if you are already familiar with threads.

The problem is I don't want to write my own dns client, and all the
FOSS ones are hard blocking.

> The general idea is to set a flag, fork a real thread to do the DNS
> lookup, than continue after the answer is available.

Have at it.  Threads are not my thing.  What DNS library can be threaded?

> The handshake code is a bit ugly/tricky since it is small pieces
> spread all over the place.

If it is only a bit ugly/tricky for you, then have at it.

> There are 2 areas to keep in mind.  The DNS thread can't call utility
> routines unless they are thread safe.  One obvious example is logging.
Which comes back to: what DNS library is hread safe?

> The other is that you can't have a lot of state on the stack when you
> want to do the DNS lookup.  The DNS lookup gets tangled up with the
> top-level pseudo thread scheduler.

But that is exactly what people want.  To do the DNS lookup long after
startup, when gpsd has grabbed a lot of state.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgp0bJCC3EYxp.pgp
Description: OpenPGP digital signature

reply via email to

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