Hello together::
I have programmed this fuction:
def OnNewMovie(self , event):
""" Local user receives a new movie event from a user"""
#self.log.debug ( "Got OnNewMovie, " + `event`)
if event.data[0] == self.pubId:
fDep.write("New movie equal\n")
fDep.flush()
#self.log.debug ( "Returning, it's my movie")
# This lets two users connect at the same time
self.lockInitSe ssion.acquire()
if self.vInitSessi on == False:
self.vInitSessi on = True
self.lockInitSe ssion.release()
else:
self.lockInitSe ssion.release()
return
#self.log.debug ( "Doing remote load event id = " + `event.data[0]` + ",
myid=" + `self.pubId`)
self.lockInitSe ssion.acquire()
self.vInitSessi on = False
self.lockInitSe ssion.release()
self.sharedAppC lient.UpdateDat aCache()
self.GetState()
wx.CallAfter(se lf.sm.RemoteLoa dMovie)
This function is a handler that is executed when a event occurs. At the end is
wx.CallAfter call.
Imagine that two events occur simultaneously. This function takes one event.
After executing ax.CallAfter call would tke the second event. Then , my doubt
would be, would be there 2 threads simultanously executing: one belongs to
self.sm.RemoteL oadMovie and the another one belongs to the handler for the
second event?
Thank you. As you can see i do not know exactly how wx.CallAfter works.
--oOo-----------------------------------------------------------------oOo--
Servicio de acceso ó correo electrónico vía web da Universidade de Vigo
Servicio de acceso al correo electrónico vía web de la Universidad de Vigo
Servicios Informáticos [ http://si.uvigo.es ]
Universidade de Vigo [ http://www.uvigo.es ]
URL: https://correoweb.uvigo.es
Comment