Skip to content

Instantly share code, notes, and snippets.

View arturl's full-sized avatar
🎯
Focusing

Artur Laksberg arturl

🎯
Focusing
  • Seattle WA
  • 16:26 (UTC -07:00)
View GitHub Profile
@arturl
arturl / test.cpp
Created November 26, 2019 05:22
test public gist
int main() { return 0; }
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using PCLCrypto;
using System;
using System.Globalization;
using System.Net;
using System.Text;
using System.Threading.Tasks;
#define BOOST_THREAD_PROVIDES_FUTURE
#define BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
#define BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
#include <boost/thread/future.hpp>
#include <string>
#include <iostream>
//#include <chrono>
//#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <typeinfo>
#include <memory>
namespace std
{
class sequential_execution_policy{
};
@arturl
arturl / task_region.cpp
Last active December 27, 2015 08:39
task_region/task_run prototype
#include "stdafx.h"
#if 0 // no PCH
#include "targetver.h"
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <tchar.h>
#include <vector>
#include <stack>
#include <ppl.h>
#include <windows.h>
@arturl
arturl / exception_guard.cpp
Created October 30, 2013 05:32
exception_guard
#include "stdafx.h"
using namespace concurrency;
using namespace std;
class exception_list : public exception
{
public:
typedef exception_ptr value_type;
typedef const value_type& reference;
@arturl
arturl / gist:6490404
Created September 9, 2013 01:38
task_group vs. std::future perf comparison
#ifdef _WIN32
#include <ppl.h>
using namespace concurrency;
#else
#include "tbb/parallel_invoke.h"
using namespace tbb;
#endif
#include <time.h>
#include <future>
using namespace std;
class exception_list : public exception
{
public:
typedef exception_ptr value_type;
typedef const value_type& reference;
typedef const value_type& const_reference;
typedef size_t size_type;
typedef vector<exception_ptr>::iterator iterator;