[Marble-devel] Review Request: Threadsafe HttpDownloadManager

Jens-Michael Hoffmann jensmh at gmx.de
Tue Aug 11 11:19:46 CEST 2009


Am Tuesday 11 August 2009 07:10:41 schrieb Henry de Valence:
> 
> > On 2009-08-10 20:34:19, jmho_ wrote:
> > > Looks good in principle, however
> > > 
> > > 1) imho there is a lock in removeJob missing,
> > > 2) I'm not sure if it is sufficient to have locks only in public methods
> > > 
> > > thanks
> 
> With regard to #2, if private methods are called from public methods, then the mutex is already locked by the time they are called. But if they are called from somewhere else (not sure where this would be) then there could be problems. 

they could be called from
- a friend class object,
- a static member function

Not sure, if any of these apply, but code changes. I'm also not sure what the best way here is:
a) minimal protection with a certain risc that unprotected code paths appear
b) maximal protection with the risc of (too much) overhead



Best Regards

Jens-Michael


More information about the Marble-devel mailing list