Re: [Hamlib-developer] [Hamlib/Hamlib] 890ed1: Change morse_data_handler from LOCK to rig_lock as..
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Black M. <mdb...@ya...> - 2024-12-02 23:20:42
|
The depth is need to avoid deadlock on recursion. So anybody coming in at level 1 has to grab the lock. Mike W9MDB On Monday, December 2, 2024 at 04:00:35 PM CST, George Baltz <geo...@gm...> wrote: On 12/2/24 16:12, Black Michael wrote: > Mutexes do address general thread safety. Yeah, but LOCK() is not (just) a mutex. Consulting an unprotected variable(depth) to decide on locking leads to all sorts of races, mismatches, and other random errors. No other facet of programming is so absolutely ruled by Murphy's Law. > > They are just a pain when you don't have thread-safe code designed from scratch. You can say that again. > > Mike W9MDB > -- 73 n3gb |