diff options
author | Othmar Gsenger <otti@anytun.org> | 2014-07-31 09:26:57 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2014-07-31 09:26:57 +0000 |
commit | 4dd51af78f2d153d5cd564540a0733133643a064 (patch) | |
tree | 67ff1b12fa82afda5448b8a7ab857ff30f7b3aa4 /src/anytun.cpp | |
parent | added a new branch for multithreading experiments (diff) |
added a go style channel implementation. this might still need some performance tweaks (use less semaphores, maybee not use ringbuffer)
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r-- | src/anytun.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp index 3f14a5e..9e97e5a 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -91,6 +91,7 @@ #endif #include "cryptinit.hpp" +#include "channel.hpp" #include "sysExec.h" bool disableRouting = false; @@ -339,7 +340,12 @@ void receiver(TunDevice* dev, PacketSource* src) void startSendRecvThreads(TunDevice* dev, PacketSource* src) { src->waitUntilReady(); - + //channel<int> a(1); + //a.push(23); + //a.push(23); + //int i=0; + //a.pop(i); + //std::cout << i << std::endl; boost::thread(boost::bind(sender, dev, src)); boost::thread(boost::bind(receiver, dev, src)); } |