Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ofxaddons
ofxCloudLib
Commits
e0d22154
Commit
e0d22154
authored
Dec 17, 2017
by
artificiel
Browse files
ClientConnector: passage de "while" a "if" pour eviter le backlog
parent
1ac1e9b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ofxCloudLib/ClientConnector.cpp
View file @
e0d22154
...
...
@@ -46,20 +46,25 @@ void ClientConnector::threadedFunction()
xyz_receiver_
.
receive
(
fresh_mesh
);
if
(
fresh_mesh
.
getNumVertices
())
{
fresh_mesh
.
removeVertex
(
0
);
}
TS_START
(
"Client::send channel thread"
);
aggregated_
.
send
(
std
::
move
(
fresh_mesh
));
TS_STOP
(
"Client::send channel thread"
);
// TODO -- le comportement est voulu (ne laisse pas de trace lors d'un frame vide)
// MAIS -- probleme lorsque le fresh_mesh est vide (filtrer de l'autre cote?)
TS_START
(
"Client::send channel thread"
);
aggregated_
.
send
(
std
::
move
(
fresh_mesh
));
TS_STOP
(
"Client::send channel thread"
);
// std::cout << "NEW CLOUD IN THREAD " << client_name_ << "#" << cloud_counter_ << std::endl;
}
else
{
handle_connection
();
// TS_START("Client::sleep()");
// TS_START("Client::sleep()");
// std::this_thread::sleep_for(std::chrono::milliseconds(10));
// TS_STOP("Client::sleep()");
handle_connection
();
}
}
}
...
...
@@ -84,7 +89,7 @@ void ClientConnector::setup()
void
ClientConnector
::
receive_mesh
()
{
while
(
aggregated_
.
tryReceive
(
last_mesh_
))
{
if
(
aggregated_
.
tryReceive
(
last_mesh_
))
{
// std::cout << "...NEW FRAME IN THREAD A " << client_name_ << std::endl;
is_new_
=
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment