**Note for MS Windows*: CAF relies on C++11 features such as variadic templates and unrestricted unions. We will support Visual Studio as soon as Microsoft's compiler implements all required C++11 features. In the meantime, you can use CAF via MinGW.
**Note for MS Windows*: CAF relies on C++11 features such as variadic templates and unrestricted unions. We will support Visual Studio as soon as Microsoft's compiler implements all required C++11 features. In the meantime, you can use CAF via MinGW.
@@ -174,3 +174,19 @@ The following table summarizes the changes made to the API.
...
@@ -174,3 +174,19 @@ The following table summarizes the changes made to the API.
Version 0.11 introduced new, optional components.
Version 0.11 introduced new, optional components.
The core library itself, however, mainly received optimizations and bugfixes with one exception: the member function \lstinline^on_exit^ is no longer virtual.
The core library itself, however, mainly received optimizations and bugfixes with one exception: the member function \lstinline^on_exit^ is no longer virtual.
You can still provide it to define a custom exit handler, but you must not use \lstinline^override^.
You can still provide it to define a custom exit handler, but you must not use \lstinline^override^.
\clearpage
\subsubsection{0.11 $\Rightarrow$ 0.12}
Version 0.12 removed two features:
\begin{itemize}
\item
Type names are no longer demangled automatically.
Hence, users must explicitly pass the type name as first argument when using \lstinline^announce^, i.e., \lstinline^announce<my_class>(...)^ becomes \lstinline^announce<my_class>("my_class", ...)^.
\item
Synchronous send blocks no longer support \lstinline^continue_with^.
This feature has been removed without substitution.
@@ -86,23 +86,3 @@ void foo(event_based_actor* self, actor testee) {
...
@@ -86,23 +86,3 @@ void foo(event_based_actor* self, actor testee) {
[=](const std::string& str) { /* handle str */ }
[=](const std::string& str) { /* handle str */ }
);
);
\end{lstlisting}
\end{lstlisting}
\clearpage
\subsubsection{Continuations for Event-based Actors}
\lib supports continuations to enable chaining of send/receive statements.
The functions \lstinline^then^ returns a helper object offering the member function \lstinline^continue_with^, which takes a functor $f$ without arguments.
After receiving a message, $f$ is invoked if and only if the received messages was handled successfully, i.e., neither \lstinline^sync_failure^ nor \lstinline^sync_timeout^ occurred.
\begin{lstlisting}
void foo(event_based_actor* self) {
actor d_or_s = ...; // replies with either a double or a string