{"record":{"id":"cf9724c41e17d351","repo":"langchain-ai/langgraph","slug":"can-t-specify-timeout-for-non-blocking-acquire","errorCode":null,"errorMessage":"can't specify timeout for non-blocking acquire","messagePattern":"can't specify timeout for non-blocking acquire","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/_internal/_queue.py","lineNumber":50,"sourceCode":"                    self._getters.remove(getter)\n                except ValueError:\n                    # The getter could be removed from self._getters by a\n                    # previous put_nowait call.\n                    pass\n                if not self.empty() and not getter.cancelled():\n                    # We were woken up by put_nowait(), but can't take\n                    # the call.  Wake up the next in line.\n                    self._wakeup_next(self._getters)\n                raise\n\n\nclass Semaphore(threading.Semaphore):\n    \"\"\"Semaphore subclass with a wait() method.\"\"\"\n\n    def wait(self, blocking: bool = True, timeout: float | None = None):\n        \"\"\"Block until the semaphore can be acquired, but don't acquire it.\"\"\"\n        if not blocking and timeout is not None:\n            raise ValueError(\"can't specify timeout for non-blocking acquire\")\n        rc = False\n        endtime = None\n        with self._cond:\n            while self._value == 0:\n                if not blocking:\n                    break\n                if timeout is not None:\n                    if endtime is None:\n                        endtime = monotonic() + timeout\n                    else:\n                        timeout = endtime - monotonic()\n                        if timeout <= 0:\n                            break\n                self._cond.wait(timeout)\n            else:\n                rc = True\n        return rc\n","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/_internal/_queue.py#L32-L68","documentation":"Error \"can't specify timeout for non-blocking acquire\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/_internal/_queue.py:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}