[Ovirt-devel] [PATCH server] Revised attempt at refactoring the vm_controller using the service layer.

Scott Seago sseago at redhat.com
Tue Apr 21 20:25:48 UTC 2009


Ian Main wrote:
> So with this service layer.. with it being included and setting local properties of the object, will that be thread safe?  Or will we have to do locking around each call?
>
> I'm not sure yet if the agent will be threaded.. but it certainly could have a thread per method invocation..
>
>     Ian
>   
This question also gets at what David and I were discussing last week 
about the scope of the service objects. On the WUI side, a controller 
object only exists for the duration of a single web request -- when we 
set @vm in the VmController object (via the VmService module) that 
instance variable will only ever be accessed by a single thread. If 
we're following something similar on the QMF side, then it's not so much 
a question of locking as it is making sure each API call gets its own 
service object.

Scott




More information about the ovirt-devel mailing list