Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
a1daeea4
Commit
a1daeea4
authored
Oct 08, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More code cleanup
parent
09fa9b17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
bsp.cpp
dlib/bsp/bsp.cpp
+10
-0
bsp.h
dlib/bsp/bsp.h
+3
-2
No files found.
dlib/bsp/bsp.cpp
View file @
a1daeea4
...
...
@@ -254,6 +254,7 @@ namespace dlib
read_thread_terminated_improperly
(
false
),
outstanding_messages
(
0
),
num_waiting_nodes
(
0
),
num_terminated_nodes
(
0
),
buf_not_empty
(
class_mutex
),
terminated_signal
(
class_mutex
),
_cons
(
cons_
),
...
...
@@ -526,6 +527,15 @@ namespace dlib
auto_mutex
lock
(
class_mutex
);
if
(
error_message
.
size
()
!=
0
)
throw
dlib
::
socket_error
(
error_message
);
if
(
outstanding_messages
!=
0
)
{
std
::
ostringstream
sout
;
sout
<<
"A BSP job was allowed to terminate before all sent messages have been received.
\n
"
;
sout
<<
"There are at least "
<<
outstanding_messages
<<
" messages still in flight. Make sure all sent messages
\n
"
;
sout
<<
"have a corresponding call to receive()."
;
throw
dlib
::
socket_error
(
sout
.
str
());
}
}
// ----------------------------------------------------------------------------------------
...
...
dlib/bsp/bsp.h
View file @
a1daeea4
...
...
@@ -117,8 +117,9 @@ namespace dlib
void
receive
(
)
{
int
junk
;
if
(
receive
(
junk
))
unsigned
long
id
;
shared_ptr
<
std
::
string
>
temp
;
if
(
receive_data
(
temp
,
id
))
throw
dlib
::
socket_error
(
"Call to bsp_context::receive() got an unexpected message."
);
}
...
...
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