Passadatum

How to pass a bit of data around a lot of function invocations that don't take such a thing as a parameter that are being called from a thread even though they were originally part of a single-threaded program:

  1. Acquire mutex on somewhere global.
  2. Put a pointer to the data there.
  3. In the winget_progress_create function, copy the pointer into the winget_progress struct and release the mutex.
  4. Stir and serve.

Is that reasonable?