Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / method

take

codeintel.edge_server._Bucket.take

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Called by (1)
SymbolFileResolved by
make_handleredge_server.pysame file
Inside (1)
SymbolFileResolved by
_Bucketedge_server.pysame file
codeintel.edge_server._Bucket.takebackend/app/codeintel/edge_server.py, lines 47–55Open source
    def take(self) -> bool:        with self.lock:            now = time.monotonic()            self.tokens = min(self.burst, self.tokens + (now - self.at) * self.rate)            self.at = now            if self.tokens >= 1:                self.tokens -= 1                return True            return False

What the index recorded

Signature
def take(self) -> bool:
File
backend/app/codeintel/edge_server.py
Lines
47–55
Parser
python-ast
Git blob
909dfc0fcf1334828a534248afdadb1c50262110
Call sites
2 named, 0 resolved, 2 left unlinked

Read it on GitHub at this commit