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
31087138
Commit
31087138
authored
Feb 25, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarified thread safety
parent
003353cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
sockstreambuf_abstract.h
dlib/sockstreambuf/sockstreambuf_abstract.h
+9
-6
No files found.
dlib/sockstreambuf/sockstreambuf_abstract.h
View file @
31087138
...
...
@@ -32,16 +32,17 @@ namespace dlib
once enough data has arrived.
THREADING
g
enerally speaking, this object has the same kind of threading
G
enerally speaking, this object has the same kind of threading
restrictions as a connection object. those being:
-
do not try to write to a sockstreambuf from more than one thread
-
do not try to read from a sockstreambuf from more than one thread
-
y
ou may call shutdown() on the connection object and this will
-
Do not try to write to a sockstreambuf from more than one thread.
-
Do not try to read from a sockstreambuf from more than one thread.
-
Y
ou may call shutdown() on the connection object and this will
cause any reading or writing calls to end. To the sockstreambuf it
will appear the same as hitting EOF. (note that EOF for a sockstreambuf
means that the connection has closed)
- it is safe to read from and write to the sockstreambuf at the same time
- it is not safe to try to putback a char and read from the stream from
- It is safe to read from and write to the sockstreambuf at the same time
from different threads so long as flushes_output_on_read()==false.
- It is not safe to try to putback a char and read from the stream from
different threads
!*/
public
:
...
...
@@ -103,6 +104,8 @@ namespace dlib
ensures
- This function returns true if this object will flush its output buffer
to the network socket before performing any network read.
- if (flushes_output_on_read() == true)
- It is not safe to make concurrent read and write calls to this object.
!*/
void
do_not_flush_output_on_read
(
...
...
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