Skip to content

Commit

Permalink
Python の関数を呼ぶ前に GIL を獲得する
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Jan 27, 2024
1 parent e8d855c commit baa536f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sora_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ void SoraConnection::OnPush(std::string text) {

void SoraConnection::OnMessage(std::string label, std::string data) {
if (on_message_) {
nb::gil_scoped_acquire acq;
on_message_(label, nb::bytes(data.c_str(), data.size()));
}
}
Expand Down

0 comments on commit baa536f

Please sign in to comment.