예제 #1
0
 def Run(self, *args, **kwargs):
     service.Service.Run(self, *args, **kwargs)
     self.facilities = {}
     self.maxActivityModifiers = {}
     self.regionLoaded = False
     self.loading = uthread.Semaphore()
     self.facilityManager = sm.RemoteSvc('facilityManager')
예제 #2
0
    def __init__(self):
        service.Service.__init__(self)
        self.downloading = 0
        self.patchChecksum = ''
        self.patchFileName = ''
        self.patchGrabber = None
        self.cancel = 0
        self.userName = ''
        self.queryString = ''
        self.verifyFailedNum = 0
        self.affiliateID = None
        patchInfoHost = [ arg.split(':', 1)[1] for arg in blue.pyos.GetArg() if arg.lower().startswith('/patchinfourl:') ]
        if patchInfoHost:
            self.patchInfoUrl = patchInfoHost[0]
            if not self.patchInfoUrl.endswith('/'):
                self.patchInfoUrl += '/'
        else:
            try:
                from appPatch import patchInfoURLs
                self.patchInfoUrl = prefs.GetValue('patchInfoUrl', patchInfoURLs[boot.region])
            except ImportError as e:
                self.LogError('Could not import patchInfoURLs from appPatch module')
                self.patchInfoUrl = prefs.GetValue('patchInfoUrl', '')
                sys.exc_clear()

        self.cntUpgradeStatusSemaphore = uthread.Semaphore()
        self.cntDoNotAskAgain = False
        self.patchInfoResponses = {}
        self.upgradeInfo = None
        self.upgradeOffered = None
예제 #3
0
파일: moniker.py 프로젝트: R4M80MrX/eve-1
 def Unbind(self, disconnectDelay = 30):
     if '__semaphoreB__' not in self.__dict__:
         self.__semaphoreB__ = uthread.Semaphore(('moniker::Bind', self.__serviceName, self.__bindParams))
     self.__semaphoreB__.acquire()
     try:
         self.__ClearBoundObject(disconnectDelay)
     finally:
         self.__semaphoreB__.release()
예제 #4
0
 def Run(self, memStream=None):
     self.state = service.SERVICE_START_PENDING
     Service.Run(self, memStream)
     self.numInQueue = 0
     self.pcQueue = uthread.Queue(0)
     self.semaphore = uthread.Semaphore('spawnTestSema', 1, True)
     self.go = False
     self.hasStarted = False
     self.state = service.SERVICE_RUNNING
예제 #5
0
    def ApplyAttributes(self, attributes):
        uiprimitives.Container.ApplyAttributes(self, attributes)
        self.cycling = False
        self.cyclingThread = None
        self.numCellRows = attributes.get('numCellRows', 5)
        maxCellsPerRow = attributes.get('maxCellsPerRow', 5)
        cellForegroundColor = attributes.get('cellForegroundColor', None)
        cellBackgroundColor = attributes.get('cellBackgroundColor', None)
        self.cellHeight = attributes.get('cellHeight', 20)
        self.cellWidth = attributes.get('cellWidth', 20)
        self.cellTextSize = attributes.get('cellTextSize', 16)
        self.cellsPerRow = attributes.get('cellsPerRow', 5)
        self.deadCells = []
        self.liveCells = []
        self.doneCells = []
        self.cellGlyphs = ['0',
         '1',
         '2',
         '3',
         '4',
         '5',
         '6',
         '7',
         '8',
         '9',
         'A',
         'B',
         'C',
         'D',
         'E',
         'F']
        self.cellRows = []
        self.cellRowContainers = []
        self.cellPaddingVertical = 0
        self.cellPaddingHorizontal = 0
        if cellForegroundColor is None:
            cellForegroundColor = (0.75, 0.0, 0.0, 0.75)
        if cellBackgroundColor is None:
            cellBackgroundColor = (0.5, 0.5, 0.5, 0.25)
        self.cellBackgroundColor = cellBackgroundColor
        self.progressColor = cellForegroundColor
        self.doneColor = (0.0, 0.5, 0.0, 0.5)
        self.flashColor = (0.75, 0.75, 0.75, 0.75)
        uicontrols.Frame(parent=self, color=(0.7, 0.7, 0.7, 0.5), idx=0)
        for x in xrange(0, self.numCellRows):
            newRow = []
            newRowContainer = uiprimitives.Container(parent=self, name='hackingCellRow', align=uiconst.TOTOP, state=uiconst.UI_DISABLED, pos=(0,
             0,
             self.width,
             self.cellHeight))
            for y in xrange(0, self.cellsPerRow):
                newRow.append(self.CreateCell(newRowContainer, self.cellHeight, self.cellWidth, cellBackgroundColor, cellForegroundColor))

            self.cellRows.append(newRow)
            self.cellRowContainers.append(newRowContainer)

        self.cellRowSemaphore = uthread.Semaphore()
예제 #6
0
    def Bind(self, sess = None, call = None):
        """
            Binds the moniker, performing the first call as well if the params are specified,
            using the given session.  If no session is specified, a service session is used.
        """
        localKeywords = ('machoTimeout', 'noCallThrottling')
        done = {}
        while 1:
            try:
                if self.__bindParams is None:
                    raise RuntimeError("Thou shall not use None as a Moniker's __bindParams")
                if '__semaphoreB__' not in self.__dict__:
                    self.__semaphoreB__ = uthread.Semaphore(('moniker::Bind', self.__serviceName, self.__bindParams))
                self.__semaphoreB__.acquire()
                try:
                    if not self.boundObject:
                        if self.__nodeID is None:
                            self.__ResolveImpl(0, sess)
                        if sess is None:
                            if session and base.IsInClientContext():
                                sess = session
                            elif session and session.role == ROLE_SERVICE:
                                sess = session.GetActualSession()
                            else:
                                sess = base.GetServiceSession('util.Moniker')
                        else:
                            sess = sess.GetActualSession()
                        if self.__nodeID == sm.GetService('machoNet').GetNodeID():
                            service = sess.ConnectToService(self.__serviceName)
                            self.boundObject = service.MachoGetObjectBoundToSession(self.__bindParams, sess)
                        else:
                            remotesvc = sess.ConnectToRemoteService(self.__serviceName, self.__nodeID)
                            self.__PerformSessionCheck()
                            if call is not None and call[2]:
                                c2 = {k:v for k, v in call[2].iteritems() if k not in localKeywords}
                                call = (call[0], call[1], c2)
                            self.boundObject, retval = remotesvc.MachoBindObject(self.__bindParams, call)
                            self.boundObject.persistantObjectID = (self.__serviceName, self.__bindParams)
                            return retval
                finally:
                    done[self.__serviceName, self.__bindParams] = 1
                    self.__semaphoreB__.release()

                if call is not None:
                    return self.MonikeredCall(call, sess)
                return
            except UpdateMoniker as e:
                if (e.serviceName, e.bindParams) in done:
                    log.LogException()
                    raise RuntimeError('UpdateMoniker referred us to the same location twice', (e.serviceName, e.bindParams))
                else:
                    self.__bindParams = e.bindParams
                    self.__serviceName = e.serviceName
                    self.__nodeID = e.nodeID
                    self.Unbind()
                    sys.exc_clear()
예제 #7
0
 def Run(self, memStream=None):
     """
     State constant assignment and base class Run() call
     """
     self.state = service.SERVICE_START_PENDING
     Service.Run(self, memStream)
     self.numInQueue = 0
     self.pcQueue = uthread.Queue(0)
     self.semaphore = uthread.Semaphore('spawnTestSema', 1, True)
     self.go = False
     self.hasStarted = False
     self.state = service.SERVICE_RUNNING
예제 #8
0
 def Unresolve(self):
     while 1:
         self.Unbind()
         if '__semaphoreR__' not in self.__dict__:
             self.__semaphoreR__ = uthread.Semaphore(('moniker::Resolve', self.__serviceName, self.__bindParams))
         self.__semaphoreR__.acquire()
         try:
             if self.boundObject is None:
                 self.__nodeID = None
                 sm.services['machoNet'].SetNodeOfAddress(self.__serviceName, self.__bindParams, None)
                 return
         finally:
             self.__semaphoreR__.release()
예제 #9
0
 def __UpdateCache(self):
     if self.__cachedObject__ is not None:
         return
     if '__semaphore__' not in self.__dict__:
         s = uthread.Semaphore(('cachedObject', self.__objectID__,
                                self.__objectVersion__, self.__nodeID__))
         self.__semaphore__ = s
     with self.__semaphore__:
         if self.__cachedObject__ is None:
             self.__cachedObject__ = sm.GetService(
                 'objectCaching').GetCachableObject(
                     self.__shared__, self.__objectID__,
                     self.__objectVersion__, self.__nodeID__).GetObject()
     if '__semaphore__' in self.__dict__:
         if self.__semaphore__.IsCool():
             del self.__semaphore__
예제 #10
0
 def Unbind(self, disconnectDelay = 30):
     """
         R.I.P.
     
         Bound Object
     
         Died of natural causes
     
         Params:
             disconnectDelay - time until the session actually detaches from the boundObject.
     """
     if '__semaphoreB__' not in self.__dict__:
         self.__semaphoreB__ = uthread.Semaphore(('moniker::Bind', self.__serviceName, self.__bindParams))
     self.__semaphoreB__.acquire()
     try:
         self.__ClearBoundObject(disconnectDelay)
     finally:
         self.__semaphoreB__.release()
예제 #11
0
 def __ResolveImpl(self, justQuery, sess=None):
     if '__semaphoreR__' not in self.__dict__:
         self.__semaphoreR__ = uthread.Semaphore(
             ('moniker::Resolve', self.__serviceName, self.__bindParams))
     self.__semaphoreR__.acquire()
     try:
         if self.__nodeID is not None:
             return self.__nodeID
         if macho.mode == 'client' or base.IsInClientContext():
             self.__nodeID = sm.services['machoNet'].GuessNodeIDFromAddress(
                 self.__serviceName, self.__bindParams)
             if self.__nodeID is not None:
                 return self.__nodeID
             if not self.__nodeID:
                 self.__nodeID = sm.services['machoNet']._addressCache.Get(
                     self.__serviceName, self.__bindParams)
                 if self.__nodeID is not None:
                     return self.__nodeID
         if sess is None:
             if session and session.role == ROLE_SERVICE:
                 sess = session.GetActualSession()
             else:
                 sess = base.GetServiceSession('util.Moniker')
         else:
             sess = sess.GetActualSession()
         if justQuery == 2:
             service = sm.services.get(self.__serviceName, None)
             if service is None:
                 return
         elif macho.mode == 'client' or base.IsInClientContext():
             service = sess.ConnectToRemoteService(self.__serviceName)
         else:
             service = sess.ConnectToAnyService(self.__serviceName)
         self.__nodeID = service.MachoResolveObject(self.__bindParams,
                                                    justQuery)
         if self.__nodeID is None and not justQuery:
             raise RuntimeError(
                 'Resolution failure:  ResolveObject returned None')
         if macho.mode == 'client' or base.IsInClientContext():
             sm.services['machoNet'].SetNodeOfAddress(
                 self.__serviceName, self.__bindParams, self.__nodeID)
         return self.__nodeID
     finally:
         self.__semaphoreR__.release()
예제 #12
0
 def __UpdateCache(self):
     """
         If we haven't obtained the cached object yet: gets  it from local "objectCaching" service, via self.__objectID__
     """
     if self.__cachedObject__ is not None:
         return
     if '__semaphore__' not in self.__dict__:
         s = uthread.Semaphore(('cachedObject', self.__objectID__,
                                self.__objectVersion__, self.__nodeID__))
         self.__semaphore__ = s
     with self.__semaphore__:
         if self.__cachedObject__ is None:
             self.__cachedObject__ = sm.GetService(
                 'objectCaching').GetCachableObject(
                     self.__shared__, self.__objectID__,
                     self.__objectVersion__, self.__nodeID__).GetObject()
     if '__semaphore__' in self.__dict__:
         if self.__semaphore__.IsCool():
             del self.__semaphore__
예제 #13
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     uthread.new(sm.GetService('bookmarkSvc').UpdateFoldersToDB)
     uicore.registry.GetLockedGroup(
         'agentgroups', 'all',
         localization.GetByLabel('UI/PeopleAndPlaces/AllAgents'))
     self.inited = 0
     self.semaphore = uthread.Semaphore((self.windowID, 0))
     self.SetCaption(
         localization.GetByLabel('UI/PeopleAndPlaces/PeopleAndPlaces'))
     self.SetTopparentHeight(52)
     self.SetWndIcon('ui_12_64_2', mainTop=-12)
     self.SetScope('station_inflight')
     self.sr.main = uiutil.GetChild(self, 'main')
     self.sr.scroll = uicls.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.sr.contacts = form.ContactsForm(name='contactsform',
                                          parent=self.sr.main,
                                          pos=(0, 0, 0, 0))
     self.sr.bookmarkbtns = uicls.ButtonGroup(btns=[
         [
             localization.GetByLabel('UI/PeopleAndPlaces/AddBookmark'),
             self.BookmarkCurrentLocation, (), 81
         ],
         [
             localization.GetByLabel('UI/PeopleAndPlaces/CreateFolder'),
             self.CreateFolder, (), 81
         ]
     ],
                                              parent=self.sr.main,
                                              idx=0)
     self.sr.agentbtns = uicls.ButtonGroup(
         btns=[[
             localization.GetByLabel('UI/PeopleAndPlaces/CreateFolder'),
             self.AddGroup, 'agentgroups', 81
         ],
               [
                   localization.GetByLabel('UI/AgentFinder/AgentFinder'),
                   uicore.cmd.OpenAgentFinder, 'agentgroups', 81
               ]],
         parent=self.sr.main,
         idx=0)
     self.sr.hint = None
     grplst = [
         [localization.GetByLabel('UI/Common/Any'), -1],
         [
             localization.GetByLabel(
                 'UI/Journal/JournalWindow/Agents/HeaderAgent'),
             const.searchResultAgent
         ],
         [
             localization.GetByLabel('UI/Common/Character'),
             const.searchResultCharacter
         ],
         [
             localization.GetByLabel('UI/Common/Corporation'),
             const.searchResultCorporation
         ],
         [
             localization.GetByLabel('UI/Common/Alliance'),
             const.searchResultAlliance
         ],
         [
             localization.GetByLabel('UI/Common/Faction'),
             const.searchResultFaction
         ],
         [
             localization.GetByLabel('UI/Common/LocationTypes/Station'),
             const.searchResultStation
         ],
         [
             localization.GetByLabel('UI/Common/LocationTypes/SolarSystem'),
             const.searchResultSolarSystem
         ],
         [
             localization.GetByLabel(
                 'UI/Common/LocationTypes/Constellation'),
             const.searchResultConstellation
         ],
         [
             localization.GetByLabel('UI/Common/LocationTypes/Region'),
             const.searchResultRegion
         ]
     ]
     self.sr.sgroup = group = uicls.Combo(
         label=localization.GetByLabel('UI/Common/SearchType'),
         parent=self.sr.topParent,
         options=grplst,
         name='addressBookComboSearchType',
         select=settings.user.ui.Get('ppSearchGroup', -1),
         width=86,
         left=74,
         top=20,
         callback=self.ChangeSearchGroup)
     self.sr.inpt = inpt = uicls.SinglelineEdit(
         name='search',
         parent=self.sr.topParent,
         maxLength=100,
         left=group.left + group.width + 6,
         top=group.top,
         width=86,
         label=localization.GetByLabel('UI/PeopleAndPlaces/SearchString'))
     btn = uicls.Button(
         parent=self.sr.topParent,
         label=localization.GetByLabel('UI/Common/Buttons/Search'),
         pos=(inpt.left + inpt.width + 2, inpt.top, 0, 0),
         func=self.Search,
         btn_default=1)
     searchByChoices = [
         [
             localization.GetByLabel(
                 'UI/Search/UniversalSearch/PartialTerms'),
             const.searchByPartialTerms
         ],
         [
             localization.GetByLabel(
                 'UI/Search/UniversalSearch/ExactTerms'),
             const.searchByExactTerms
         ],
         [
             localization.GetByLabel(
                 'UI/Search/UniversalSearch/ExactPhrase'),
             const.searchByExactPhrase
         ],
         [
             localization.GetByLabel(
                 'UI/Search/UniversalSearch/OnlyExactPhrase'),
             const.searchByOnlyExactPhrase
         ]
     ]
     self.sr.searchBy = searchBy = uicls.Combo(
         label=localization.GetByLabel('UI/Common/SearchBy'),
         parent=self.sr.topParent,
         options=searchByChoices,
         name='addressBookComboSearchBy',
         select=settings.user.ui.Get('ppSearchBy', 1),
         width=233,
         left=75,
         top=inpt.top + inpt.height + 2,
         labelleft=group.left + group.width + 6 - 75,
         callback=self.ChangeSearchBy)
     self.SetTopparentHeight(max(52, searchBy.top + searchBy.height))
     self.sr.scroll.sr.content.OnDropData = self.OnDropData
     idx = settings.user.tabgroups.Get('addressbookpanel', None)
     if idx is None:
         settings.user.tabgroups.Set('addressbookpanel', 4)
     tabs = [[
         localization.GetByLabel('UI/PeopleAndPlaces/Contacts'),
         self.sr.contacts, self, 'contact', None
     ],
             [
                 localization.GetByLabel('UI/PeopleAndPlaces/Agents'),
                 self.sr.scroll, self, 'agents', None
             ],
             [
                 localization.GetByLabel('UI/PeopleAndPlaces/Places'),
                 self.sr.scroll, self, 'places', None
             ]]
     maintabs = uicls.TabGroup(name='tabparent',
                               align=uiconst.TOTOP,
                               height=18,
                               parent=self.sr.main,
                               idx=0,
                               tabs=tabs,
                               groupID='addressbookpanel',
                               autoselecttab=True)
     maintabs.sr.Get(
         '%s_tab' % localization.GetByLabel('UI/PeopleAndPlaces/Agents'),
         None).OnTabDropData = self.DropInAgents
     maintabs.sr.Get(
         '%s_tab' % localization.GetByLabel('UI/PeopleAndPlaces/Contacts'),
         None).OnTabDropData = self.DropInPersonalContact
     self.placesHeaders = [
         localization.GetByLabel('UI/PeopleAndPlaces/Label'),
         localization.GetByLabel('UI/Common/Type'),
         localization.GetByLabel('UI/PeopleAndPlaces/Jumps'),
         localization.GetByLabel('UI/PeopleAndPlaces/Sol'),
         localization.GetByLabel('UI/PeopleAndPlaces/Con'),
         localization.GetByLabel('UI/PeopleAndPlaces/Reg'),
         localization.GetByLabel('UI/Common/Date'),
         localization.GetByLabel('UI/PeopleAndPlaces/Creator')
     ]
     self.sr.maintabs = maintabs
     self.inited = 1
예제 #14
0
 def Run(self, memStream=None):
     self.semaphore = uthread.Semaphore()
     self.onlineStatus = None
예제 #15
0
    def GetCachableObject(self, shared, objectID, objectVersion, nodeID):
        """
            Returns a cached copy of object 'objectID' or returns None if 'objectID' is not found in cache.
            If the cached version is older than 'objectVersion': acquire it from node nodeID (through
              our proxy, of course, if we're a client).
            'shared' is true iff object has been cached in "shared" mode (meaning: a copy is cached on servers and proxies).
            Returns a utilCachedObject or objectCaching.CachedObject.
        """
        callTimer = base.CallTimer('objectCaching::GetCachableObject')
        try:
            if macho.mode == 'client':
                gpcs = sm.services['machoNet']
            else:
                gpcs = sm.services['machoNet']
                gpcs.GetGPCS()
            if objectID in self.cachedObjects and isinstance(
                    self.cachedObjects[objectID],
                    utilCachedObject) and macho.mode == 'proxy':
                if sm.services['machoNet'].GetTransportOfNode(
                        self.cachedObjects[objectID].__nodeID__) is None:
                    del self.cachedObjects[objectID]
            if objectID in self.cachedObjects and isinstance(
                    self.cachedObjects[objectID], uthread.Semaphore
            ) or objectID not in self.cachedObjects or not isinstance(
                    self.cachedObjects[objectID],
                    uthread.Semaphore) and self.__OlderVersion(
                        self.cachedObjects[objectID].version, objectVersion):
                if objectID not in self.cachedObjects or not isinstance(
                        self.cachedObjects[objectID],
                        uthread.Semaphore) and self.__OlderVersion(
                            self.cachedObjects[objectID].version,
                            objectVersion):
                    self.cachedObjects[objectID] = uthread.Semaphore(
                        ('objectCaching', objectID))
                while 1:
                    semaphore = self.cachedObjects[objectID]
                    semaphore.acquire()
                    try:
                        if not isinstance(self.cachedObjects[objectID],
                                          uthread.Semaphore):
                            self.__UpdateStatisticsGetCachableObject(
                                objectID, objectVersion,
                                self.cachedObjects[objectID])
                            return self.cachedObjects[objectID]
                        if macho.mode == 'client':
                            if shared:
                                if not sm.services['machoNet'].myProxyNodeID:
                                    proxyNodeID = nodeID
                                else:
                                    proxyNodeID = sm.services[
                                        'machoNet'].myProxyNodeID
                                remoteObject = gpcs.RemoteServiceCall(
                                    session, proxyNodeID, 'objectCaching',
                                    'GetCachableObject', shared, objectID,
                                    objectVersion, nodeID)
                            else:
                                remoteObject = gpcs.RemoteServiceCall(
                                    session, nodeID, 'objectCaching',
                                    'GetCachableObject', shared, objectID,
                                    objectVersion, nodeID)
                            self.cachedObjects[objectID] = remoteObject
                            self.__CacheIsDirty('cachedObjects', objectID)
                        elif macho.mode == 'proxy':
                            remoteObject = gpcs.RemoteServiceCall(
                                self.session, nodeID, 'objectCaching',
                                'GetCachableObject', shared, objectID,
                                objectVersion, nodeID)
                            if not remoteObject.compressed and len(
                                    remoteObject.pickle) > 200:
                                try:
                                    t = ClockThis('objectCaching::compress',
                                                  zlib.compress,
                                                  remoteObject.pickle, 1)
                                except zlib.error as e:
                                    raise RuntimeError(
                                        'Compression Failure: ' + strx(e))

                                if len(t) < len(remoteObject.pickle):
                                    remoteObject.compressed = 1
                                    remoteObject.pickle = t
                            if remoteObject.shared:
                                self.cachedObjects[objectID] = remoteObject
                                self.__CacheIsDirty('cachedObjects', objectID)
                            else:
                                del self.cachedObjects[objectID]
                                return remoteObject
                        elif macho.mode == 'server':
                            self.LogError(
                                "Some dude asked me for a cached object I just don't have, objectID=",
                                objectID, ', objectVersion=', objectVersion,
                                ', nodeID=', nodeID)
                            del self.cachedObjects[objectID]
                            raise RuntimeError(
                                "I don't have %s, which just don't make sense...."
                                % repr(objectID))
                    finally:
                        semaphore.release()

                    if not isinstance(self.cachedObjects[objectID],
                                      uthread.Semaphore):
                        self.__UpdateStatisticsGetCachableObject(
                            objectID, objectVersion,
                            self.cachedObjects[objectID])
                        return self.cachedObjects[objectID]

            else:
                if macho.mode == 'server' and not self.cachedObjects[
                        objectID].shared:
                    tmp = self.cachedObjects[objectID]
                    self.__UpdateStatisticsGetCachableObject(
                        objectID, objectVersion, self.cachedObjects[objectID])
                    del self.cachedObjects[objectID]
                    return tmp
                self.__UpdateStatisticsGetCachableObject(
                    objectID, objectVersion, self.cachedObjects[objectID])
                return self.cachedObjects[objectID]
        finally:
            callTimer.Done()
예제 #16
0
 def __init__(self, boundObject):
     corpObject.base.__init__(self, boundObject)
     self.__lock = uthread.Semaphore()
     self.__members = None
     self.__memberIDs = None
     self.MemberCanRunForCEO_ = None
예제 #17
0
 def __init__(self, boundObject):
     corpObject.base.__init__(self, boundObject)
     self.__lock = uthread.Semaphore()
     self.corpRecruitment = None
     self.myRecruitment = None
예제 #18
0
 def Run(self, *args):
     self.guests = None
     self.lock = uthread.Semaphore()
예제 #19
0
 def Run(self, *args):
     sm.FavourMe(self.OnOfficeRentalChanged)
     self.lock = uthread.Semaphore()
     self.offices = None
예제 #20
0
파일: channels.py 프로젝트: R4M80MrX/eve-1
 def Run(self, memStream = None):
     self.LogInfo('Starting Channels')
     self.semaphore = uthread.Semaphore()
예제 #21
0
 def Run(self, *args):
     Service.Run(self, *args)
     self.activeEffects = {}
     self.transitionLock = uthread.Semaphore(
         'VisualEffectSvc transition lock')
     self.godRays = GodRays(self.sceneManager)
 def Lock(self):
     if self.sr.lock is None:
         self.sr.lock = uthread.Semaphore()
     self.sr.lock.acquire()
예제 #23
0
 def __init__(self):
     self.__semaphore = uthread.Semaphore()