Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nett-python
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
nett-python
Commits
39e8899e
Commit
39e8899e
authored
Mar 28, 2016
by
cnowke
Browse files
Options
Downloads
Patches
Plain Diff
removed interpreter stall when receiving a message in a python thread
parent
d4955add
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nett-python/nett-python.cpp
+6
-1
6 additions, 1 deletion
src/nett-python/nett-python.cpp
with
6 additions
and
1 deletion
src/nett-python/nett-python.cpp
+
6
−
1
View file @
39e8899e
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#include
<memory>
#include
<memory>
#include
<../schema/string_message.pb.h>
#include
<../schema/string_message.pb.h>
#include
<../schema/tick_message.pb.h>
using
namespace
boost
::
python
;
using
namespace
boost
::
python
;
...
@@ -56,7 +57,11 @@ public:
...
@@ -56,7 +57,11 @@ public:
std
::
string
receive
()
std
::
string
receive
()
{
{
event_type
message
=
slot_
->
receive
();
event_type
message
;
Py_BEGIN_ALLOW_THREADS
message
=
slot_
->
receive
();
Py_END_ALLOW_THREADS
std
::
string
binary_message
;
std
::
string
binary_message
;
if
(
!
message
.
SerializeToString
(
&
binary_message
)
)
if
(
!
message
.
SerializeToString
(
&
binary_message
)
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment