Hi
*From: *Victor Toso <[email protected]> *Sent: *pondělí 2. května 2016 10:30 *To: *Lukas Venhoda <[email protected]> *Cc: *[email protected] *Subject: *Re: [Spice-devel] [phodav PATCH 3/3 v5] spice-webdavd-windows: Dismount shared folder on service stop Hi, On Mon, May 02, 2016 at 10:05:33AM +0200, Lukas Venhoda wrote: > Why not use the same struct in both contexts and a mutex to avoid > concurrency > problems? > > Cheers, > toso > > Because ServiceData is not used, when called with --no-service. > > It won’t be created on stack, and would need to be allocated > afterwards in run_service, just so that we don’t use gchar*. --no-service is likely a dev option (not a default option for users); I don't think it should impact code improvements. Using a reference to the same struct with a mutex seems better even if just for a simple char... :( I don’t know. I don’t find allocating a structure dynamically when we don’t have to (and we don’t even need it) as a code improvement.
_______________________________________________ Spice-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/spice-devel
