one harmful thing about C++ is that the angle brackets sucks at pandoc :^)

This commit is contained in:
qorg11 2021-12-09 17:40:06 +01:00
parent 7cc4619b13
commit 9d09e3cba4
No known key found for this signature in database
GPG Key ID: 343FC20A4ACA62B9
1 changed files with 6 additions and 6 deletions

View File

@ -16,9 +16,9 @@ that the pthreads API are garbage. But C++'s threads API is much
better:
<pre class="prettyprint">
#include <iostream>
#include <thread>
#include <mutex>
#include &lt;iostream&gt;
#include &lt;thread&gt;
#include &lt;mutex&gt;
int j = 10;
@ -66,8 +66,8 @@ above you'll have to have a lot of patience to work with
pthreads). but C++ does.
<pre class="prettyprint">
#include <iostream>
#include <future>
#include &lt;iostream&gt;
#include &lt;future&gt;
int
do_stuff()
@ -78,7 +78,7 @@ do_stuff()
int
main()
{
std::future<int> future = std::async(do_stuff);
std::future&lt;int&gt; future = std::async(do_stuff);
std::cout << "do_stuff() is being executed in the background" << std::endl;
std::cout << "The return value of do_stuff is: " << future.get() << std::endl;
return 0;