about summary refs log tree commit diff
path: root/src/rt/sync/rust_thread.h
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-05 08:56:08 -0800
committerbors <bors@rust-lang.org>2013-11-05 08:56:08 -0800
commit7fb583be7b0df80c91df026c6a2bde550bc27a7c (patch)
tree5471652a73737a511636093172321b7d1dc06130 /src/rt/sync/rust_thread.h
parent92065ceb634872f53a1a402cf306fbf02550b00d (diff)
parent47e0bd403a04d26506f723ac44ee9ea0aa5d3ad5 (diff)
downloadrust-7fb583be7b0df80c91df026c6a2bde550bc27a7c.tar.gz
rust-7fb583be7b0df80c91df026c6a2bde550bc27a7c.zip
auto merge of #10290 : dbussink/rust/thread_in_rust, r=alexcrichton
This binds to the appropriate pthreads_* and Windows specific functions
and calls them from Rust. This allows for removal of the C++ support
code for threads.

This needs to be reviewed for the Windows parts, I've tested on OS X and Linux.

Fixes #10162
Diffstat (limited to 'src/rt/sync/rust_thread.h')
-rw-r--r--src/rt/sync/rust_thread.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/rt/sync/rust_thread.h b/src/rt/sync/rust_thread.h
deleted file mode 100644
index 257eefceb43..00000000000
--- a/src/rt/sync/rust_thread.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#ifndef RUST_THREAD_H
-#define RUST_THREAD_H
-
-#include "rust_globals.h"
-
-/**
- * Thread utility class. Derive and implement your own run() method.
- */
-class rust_thread {
- private:
-#if defined(__WIN32__)
-    HANDLE thread;
-#else
-    pthread_t thread;
-#endif
- public:
-
-    rust_thread();
-    virtual ~rust_thread();
-
-    void start();
-
-    virtual void run() = 0;
-
-    void join();
-};
-
-#endif /* RUST_THREAD_H */