We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2203a5b commit 1393d6eCopy full SHA for 1393d6e
src/pb_cancel.cc
@@ -1,4 +1,4 @@
1
-// Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+// Copyright 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
//
3
// Redistribution and use in source and binary forms, with or without
4
// modification, are permitted provided that the following conditions
@@ -57,6 +57,9 @@ PbCancel::ShmPayload()
57
bool
58
PbCancel::IsCancelled()
59
{
60
+ // Release the GIL. Python objects are not accessed during the check.
61
+ py::gil_scoped_release gil_release;
62
+
63
std::unique_lock<std::mutex> lk(mu_);
64
// The cancelled flag can only move from false to true, not the other way, so
65
// it is checked on each query until cancelled and then implicitly cached.
0 commit comments