This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void func_with_fork() | |
| { | |
| // local vars | |
| auto r = std::async(std::launch::async, [&]() { | |
| // forked thread code | |
| }); | |
| // main thread code | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| template<typename T> | |
| struct Foo | |
| { | |
| void do_something(); | |
| Foo() | |
| { | |
| std::cout << "ctor" << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template<typename T> | |
| struct StrRange; | |
| template<size_t N> | |
| struct StrRange<const char[N]> | |
| { | |
| typedef const char * ConstIterator; | |
| StrRange(const char (&t)[N]) | |
| : m_begin(t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (echo %version%) > version.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| if 1==0 ( | |
| echo first build (debug) | |
| echo second build (release) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %module(threads="1") something | |
| %{ | |
| // Register a callback (called from Python code) | |
| // callbackFunc is a Python callable accepting one argument | |
| void registerHandler(PyObject *callbackFunc) | |
| { | |
| SWIG_PYTHON_THREAD_BEGIN_ALLOW; | |
| const bool hasCallback = |
NewerOlder