45 changes: 39 additions & 6 deletions doc/changes.qbk
Expand Up @@ -8,6 +8,43 @@

[section:changes History]

[heading Version 4.4.0 - boost 1.57]

[*Know Bugs:]

* [@http://svn.boost.org/trac/boost/ticket/2442 #2442] Application statically linked with Boost.Thread crashes when Google Desktop is installed (Windows XP)
* [@http://svn.boost.org/trac/boost/ticket/3926 #3926] thread_specific_ptr + dlopen library causes a SIGSEGV.
* [@http://svn.boost.org/trac/boost/ticket/4833 #4833] MinGW/test_tss_lib: Support of automatic tss cleanup for native threading API not available
* [@http://svn.boost.org/trac/boost/ticket/6782 #6782] call_once uses incorrect barrier intrinsic on Visual Studio
* [@http://svn.boost.org/trac/boost/ticket/7319 #7319] Take care of c++std-lib-32966 issue
* [@http://svn.boost.org/trac/boost/ticket/8600 #8600] wait_for_any hangs, if called with multiple copies of shared_future referencing same task
* [@http://svn.boost.org/trac/boost/ticket/9307 #9307] future::fallback_to assert with ERRORRRRR boost: mutex lock failed in pthread_mutex_lock: Invalid argument
* [@http://svn.boost.org/trac/boost/ticket/9308 #9308] future::async fails with terminate called throwing an exception when called with a lambda - clang-darwin-asan11
* [@http://svn.boost.org/trac/boost/ticket/9310 #9310] test_4648_lib fails on clang-darwin-asan11
* [@http://svn.boost.org/trac/boost/ticket/9311 #9311] ex_lambda_future fails on msvc-11.0

* [@http://svn.boost.org/trac/boost/ticket/9425 #9425] Boost promise & future does not use supplied allocator for value storage
* [@http://svn.boost.org/trac/boost/ticket/9558 #9558] future continuations unit test hangs in get()/pthread_cond_wait() on Mac 10.7/32-bit/x86/darwin-4.2.1

Please take a look at [@https://svn.boost.org/trac/boost/query?status=assigned&status=new&status=reopened&component=thread&type=!Feature+Requests&col=id&col=summary&order=id thread Know Bugs] to see the current state.

Please take a look at [@http://www.boost.org/development/tests/release/developer/thread.html thread trunk regression test] to see the last snapshot.


[*Sever limitations:]

There are some severe bugs that prevent the use of the library on concrete contexts, in particular:

* on thread specific storage that prevent the library to be used with dynamic libraries,
* The experimental features of boost::future have some severe holes that make the program crash unexpectedly.

[*New Experimental Features:]

* [@http://svn.boost.org/trac/boost/ticket/10298 #10298] Synchro: Added queue views.
* [@http://svn.boost.org/trac/boost/ticket/10300 #10300] Async: Added generic_executor_ref.

[*Fixed Bugs:]

[heading Version 4.3.0 - boost 1.56]

[*Know Bugs:]
Expand Down Expand Up @@ -506,12 +543,8 @@ The following features will be included in next releases.
* [@http://svn.boost.org/trac/boost/ticket/8273 #8273] Synchro: Add externally locked streams.
* [@http://svn.boost.org/trac/boost/ticket/8514 #8514] Async: Add a thread_pool executor with work stealing.

# Add some of the extension proposed in [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3428.pdf A Standardized Representation of Asynchronous Operations] or extension to them, in particular

* [@http://svn.boost.org/trac/boost/ticket/7446 #7446] Async: Add when_any.
* [@http://svn.boost.org/trac/boost/ticket/7447 #7447] Async: Add when_all.
* [@http://svn.boost.org/trac/boost/ticket/7448 #7448] Async: Add async taking a scheduler parameter.
* [@http://svn.boost.org/trac/boost/ticket/8516 #8516] Async: Add future/shared_future::then taking a scheduler as parameter.
# Add extensions related to fork-join as:
* [@http://svn.boost.org/trac/boost/ticket/9600 #9600] Async: Add task_region/task_run.

# And some additional extensions related to futures as:

Expand Down
247 changes: 226 additions & 21 deletions doc/sync_queues_ref.qbk
Expand Up @@ -229,12 +229,12 @@ where
[endsect]

[/////////////////////////////////////]
[section:non_waaiting Non-waiting Concurrent Queue Operations]
[section:non_waiting Non-waiting Concurrent Queue Operations]

The ConcurrentQueue concept models a queue with .
The ConcurrentQueue concept models a queue with Non-waiting operations.


A type `Q` meets the ConcurrentQueue requirements if the following expressions are well-formed and have the specified semantics
A type `Q` meets the ConcurrentQueue requirements if is a model of a BasicConcurrentQueue and the following expressions are well-formed and have the specified semantics

* `s = q.try_push_back(e);`
* `s = q.try_push_back(rve);`
Expand Down Expand Up @@ -281,7 +281,7 @@ where

[endsect]
[/////////////////////////////////////]
[section:try_push_back_m `s = q.try_push_back(rve());`]
[section:try_push_back_m `s = q.try_push_back(rve);`]

[variablelist

Expand Down Expand Up @@ -345,7 +345,7 @@ For cases when blocking for mutual exclusion is undesirable, we have non-blockin
The interface is the same as the try operations but is allowed to also return queue_op_status::busy
in case the operation is unable to complete without blocking.

Non-blocking operations are provided only for BlockingQueues
Non-blocking operations are provided only for lock based queues

* `s = q.nonblocking_push_back(nb, e);`
* `s = q.nonblocking_push_back(nb, rve);`
Expand Down Expand Up @@ -616,6 +616,226 @@ Closed queues add the following valid expressions

[endsect]

[endsect]

[/////////////////////////////////////]
[section:queue_op_status Queue Operation Status]

#include <boost/thread/concurrent_queues/queue_op_status.hpp>

namespace boost
{
enum class queue_op_status { success = 0, empty, full, closed, busy }
}

[endsect]
[/////////////////////////////////////]
[section:queue_base Queue Base]

#include <boost/thread/concurrent_queues/queue_base.hpp>

namespace boost
{
template <typename ValueType>
class queue_base
{
public:
typedef ValueType value_type;
typedef std::size_t size_type;

// Constructors/Assignment/Destructors
virtual ~queue_base() {};

// Observers
virtual bool empty() const = 0;
virtual bool full() const = 0;
virtual size_type size() const = 0;
virtual bool closed() const = 0;

// Modifiers
virtual void close() = 0;

virtual void push_back(const value_type& x) = 0;
virtual void push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;

virtual void pull_front(value_type&) = 0;
virtual value_type pull_front() = 0;

virtual queue_op_status try_push_back(const value_type& x) = 0;
virtual queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
virtual queue_op_status try_pull_front(value_type&) = 0;

virtual queue_op_status nonblocking_push_back(const value_type& x) = 0;
virtual queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
virtual queue_op_status nonblocking_pull_front(value_type&) = 0;

virtual queue_op_status wait_push_back(const value_type& x) = 0;
virtual queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x) = 0;
virtual queue_op_status wait_pull_front(ValueType& elem) = 0;

};
}

[endsect]
[/////////////////////////////////////]
[section:queue_adaptor Queue Adaptor]

#include <boost/thread/concurrent_queues/queue_adaptor.hpp>

namespace boost
{
template <typename Queue>
class queue_adaptor : public queue_base<typename Queue::value_type>
{
public:
typedef typename Queue::value_type value_type;
typedef std::size_t size_type;

// Constructors/Assignment/Destructors

queue_adaptor();

// Observers
bool empty() const;
bool full() const;
size_type size() const { return queue.size(); }
bool closed() const;

// Modifiers
void close();

void push_back(const value_type& x);
void push_back(BOOST_THREAD_RV_REF(value_type) x);

void pull_front(value_type& x);
value_type pull_front();

queue_op_status try_push_back(const value_type& x);
queue_op_status try_push_back(BOOST_THREAD_RV_REF(value_type) x);
queue_op_status try_pull_front(value_type& x);

queue_op_status nonblocking_push_back(const value_type& x);
queue_op_status nonblocking_push_back(BOOST_THREAD_RV_REF(value_type) x);
queue_op_status nonblocking_pull_front(value_type& x);

queue_op_status wait_push_back(const value_type& x);
queue_op_status wait_push_back(BOOST_THREAD_RV_REF(value_type) x);
queue_op_status wait_pull_front(value_type& x);

};
}

[endsect]
[/////////////////////////////////////]
[section:queue_views Queue Views]

#include <boost/thread/concurrent_queues/queue_views.hpp>

namespace boost
{
template <typename Queue>
class queue_back_view;
template <typename Queue>
class queue_front_view

template <class T>
using queue_back = queue_back_view<queue_base<T>>;
template <class T>
using queue_front = queue_front_view<queue_base<T>>;
}

[/////////////////////////////////////]
[section:queue_back_view Class template `queue_back_view<>`]

template <typename Queue>
class queue_back_view
{
public:
typedef typename Queue::value_type value_type;
typedef typename Queue::size_type size_type;

// Constructors/Assignment/Destructors
queue_back_view(Queue& q) noexcept;

// Observers
bool empty() const;
bool full() const;
size_type size() const;
bool closed() const;

// Modifiers
void close();

void push(const value_type& x);
void push(BOOST_THREAD_RV_REF(value_type) x);

void pull(value_type& x);
value_type pull();

queue_op_status try_push(const value_type& x);
queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x);

queue_op_status try_pull(value_type& x);

queue_op_status nonblocking_push(const value_type& x);
queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x);

queue_op_status nonblocking_pull(value_type& x);

queue_op_status wait_push(const value_type& x);
queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x);
queue_op_status wait_pull_front(value_type& x);

};

[endsect]
[/////////////////////////////////////]
[section:queue_front_view Class template `queue_front_view<>`]


template <typename Queue>
class queue_front_view
{
public:
typedef typename Queue::value_type value_type;
typedef typename Queue::size_type size_type;

// Constructors/Assignment/Destructors
queue_front_view(Queue& q) BOOST_NOEXCEPT;

// Observers
bool empty() const;
bool full() const;
size_type size() const;
bool closed() const;

// Modifiers
void close();

void push(const value_type& x);
void push(BOOST_THREAD_RV_REF(value_type) x);

void pull(value_type& x);
value_type pull();

queue_op_status try_push(const value_type& x);
queue_op_status try_push(BOOST_THREAD_RV_REF(value_type) x);

queue_op_status try_pull(value_type& x);

queue_op_status nonblocking_push(const value_type& x);
queue_op_status nonblocking_push(BOOST_THREAD_RV_REF(value_type) x);

queue_op_status nonblocking_pull(value_type& x);

queue_op_status wait_push(const value_type& x);
queue_op_status wait_push(BOOST_THREAD_RV_REF(value_type) x);
queue_op_status wait_pull(value_type& x);

};


[endsect]
[endsect]
[/////////////////////////////////////]
[section:sync_bounded_queue_ref Synchronized Bounded Queue]
Expand Down Expand Up @@ -830,7 +1050,7 @@ Closed queues add the following valid expressions


[/////////////////////////////////////]
[section:constructor Constructor `sync_bounded_queue(size_type)`]
[section:constructor Constructor `sync_queue(size_type)`]

explicit sync_queue();

Expand All @@ -843,21 +1063,6 @@ Closed queues add the following valid expressions
]


[endsect]
[/////////////////////////////////////]
[section:constructort Template Constructor `sync_bounded_queue(size_type, Range)`]

template <typename Range>
sync_bounded_queue(size_type max_elems, Range range);

[variablelist

[[Effects:] [Constructs an sync_queue with all the elements of the range. ]]

[[Throws:] [any exception that can be throw because of resources unavailable. ]]

]

[endsect]
[/////////////////////////////////////]
[section:full Member Function `full()`]
Expand Down
2 changes: 1 addition & 1 deletion doc/thread.qbk
Expand Up @@ -8,7 +8,7 @@

[library Thread
[quickbook 1.5]
[version 4.3.0]
[version 4.4.0]
[authors [Williams, Anthony] [Botet Escriba, Vicente J.]]
[copyright 2007-11 Anthony Williams]
[copyright 2011-14 Vicente J. Botet Escriba]
Expand Down