mucbuc / circuit (public) (License: GPLv3) (since 2020-06-28) (hash sha1)
Synchronize container operations for single objects
List of commits:
Subject Hash Author Date (UTC)
index.h 74aafab338206a3d3c02b7448852dbde831692dc mucbuc 2020-01-12 04:42:02
factory returns shared_ptr 0d8ff1b381e3c7e275ebd99705853f54b100cdf9 mucbuc 2020-01-12 04:05:15
init 01daaea5899ac77acb8ec0c15583573d78eb9f31 mucbuc 2020-01-12 03:10:36
Commit 74aafab338206a3d3c02b7448852dbde831692dc - index.h
Author: mucbuc
Author date (UTC): 2020-01-12 04:42
Committer name: mucbuc
Committer date (UTC): 2020-01-12 04:42
Parent(s): 0d8ff1b381e3c7e275ebd99705853f54b100cdf9
Signing key:
Tree: 376f67aead52952bdcdbde559747615c86d0e67e
File Lines added Lines deleted
src/index.h 18 0
test/src/main.cpp 3 4
File src/index.h added (mode: 100644) (index 0000000..f370ad5)
1 #pragma once
2
3 #include "impl/circuit_host.h"
4 #include "impl/stack.h"
5 #include "impl/queue.h"
6
7 namespace om636 {
8 namespace twice_size {
9
10 template<typename T>
11 using CircuitStack = CircuitHost<T, StackPolicy>;
12
13 template<typename T>
14 using CircuitQueue = CircuitHost<T, QueuePolicy>;
15
16 } // twice_size
17 } // om636
18
File test/src/main.cpp changed (mode: 100644) (index 9752dd4..78bd44c)
3 3
4 4 #include <tmp/src/test.h> #include <tmp/src/test.h>
5 5
6 #include <lib/circuit/src/factory.h>
6 #include <lib/circuit/src/index.h>
7 7
8 8 template <class T> template <class T>
9 9 void test_wait_pop(T s) void test_wait_pop(T s)
10 10 { {
11
12 11 auto tmp = std::thread([=]() { auto tmp = std::thread([=]() {
13 12 int i(0); int i(0);
14 13 s->wait_pop(i); s->wait_pop(i);
 
... ... int main()
23 22 { {
24 23 using namespace om636::twice_size; using namespace om636::twice_size;
25 24
26 test_wait_pop(make_stack<int>());
27 test_wait_pop(make_queue<int>());
25 test_wait_pop(std::make_shared<CircuitStack<int>>());
26 test_wait_pop(std::make_shared<CircuitQueue<int>>());
28 27
29 28 return 0; return 0;
30 29 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/circuit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/circuit

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/circuit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main