Commit 68658f88 authored by Davis King's avatar Davis King

Added another constructor to the linker that lets you link two connections

right away.
parent c016de42
......@@ -24,6 +24,22 @@ namespace dlib
{
}
// ----------------------------------------------------------------------------------------
linker::
linker (
connection& a,
connection& b
) :
running(false),
running_signaler(running_mutex),
A(0),
B(0),
service_connection_running_signaler(service_connection_running_mutex)
{
link(a,b);
}
// ----------------------------------------------------------------------------------------
linker::
......
......@@ -70,10 +70,14 @@ namespace dlib
typedef linker kernel_1a;
typedef linker kernel_1a_c;
linker(
);
linker (
connection& a,
connection& b
);
virtual ~linker(
);
......
......@@ -36,7 +36,6 @@ namespace dlib
public:
linker(
);
/*!
......@@ -47,6 +46,21 @@ namespace dlib
- dlib::thread_error
!*/
linker (
connection& a,
connection& b
);
/*!
ensures
- #*this is properly initialized
- immediately invokes link(a,b);
(i.e. using this constructor is the same as creating a linker with
the default constructor and then immediately invoking link() on it)
throws
- std::bad_alloc
- dlib::thread_error
!*/
virtual ~linker(
);
/*!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment