summaryrefslogtreecommitdiff
path: root/node/Thread.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2014-03-25 17:31:03 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2014-03-25 17:31:03 -0700
commit67a85221d5bac4b363d3f8d0263a9b8848ba0adb (patch)
tree8d9074e5f1ef158aaa3d4825d2619370929e6080 /node/Thread.hpp
parent328be8f8461462ad88a639822b7df32f7b92211f (diff)
downloadinfinitytier-67a85221d5bac4b363d3f8d0263a9b8848ba0adb.tar.gz
infinitytier-67a85221d5bac4b363d3f8d0263a9b8848ba0adb.zip
WINDOWS IS SUFFERING
Diffstat (limited to 'node/Thread.hpp')
-rw-r--r--node/Thread.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/node/Thread.hpp b/node/Thread.hpp
index 4d514687..6426d5bb 100644
--- a/node/Thread.hpp
+++ b/node/Thread.hpp
@@ -80,6 +80,13 @@ public:
Sleep((DWORD)ms);
}
+ // Not available on *nix platforms
+ static inline void cancelIO(const Thread &t)
+ {
+ if (t._th != NULL)
+ CancelSynchronousIo(t._th);
+ }
+
private:
HANDLE _th;
DWORD _tid;