fix: avoid changing class outside of GIL

This commit is contained in:
Henry Fredrick Schreiner 2021-01-26 19:29:22 -05:00 committed by Henry Schreiner
parent dff9b3b432
commit 732bf88d19
1 changed files with 3 additions and 1 deletions

View File

@ -52,9 +52,11 @@ private:
pywrite(line);
pyflush();
// Placed inside gil_scoped_aquire as a mutex to avoid a race
setp(pbase(), epptr());
}
setp(pbase(), epptr());
}
return 0;
}