parameters: (self)
return_statement: return self._value == 0
docstring: Returns True if semaphore can not be acquired immediately.
docstring_summary: Returns True if semaphore can not be acquired immediately.
docstring_tokens: Returns True if semaphore can not be acquired immediately .
function: def locked(self):
          """Returns True if semaphore can not be acquired immediately."""
          return self._value == 0
function_tokens: def locked ( self ) : return self . _value == 0