Skip to content

Commit e6a7e43

Browse files
committed
rt: Remove is_running flag from rust_thread. Unused
1 parent 42db203 commit e6a7e43

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

src/rt/sync/sync.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void sync::sleep(size_t timeout_in_ms) {
1919
#endif
2020
}
2121

22-
rust_thread::rust_thread() : _is_running(false), thread(0) {
22+
rust_thread::rust_thread() : thread(0) {
2323
}
2424

2525
#if defined(__WIN32__)
@@ -46,7 +46,6 @@ rust_thread::start() {
4646
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
4747
pthread_create(&thread, &attr, rust_thread_start, (void *) this);
4848
#endif
49-
_is_running = true;
5049
}
5150

5251
void
@@ -59,10 +58,4 @@ rust_thread::join() {
5958
pthread_join(thread, NULL);
6059
#endif
6160
thread = 0;
62-
_is_running = false;
63-
}
64-
65-
bool
66-
rust_thread::is_running() {
67-
return _is_running;
6861
}

src/rt/sync/sync.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ class sync {
3737
* Thread utility class. Derive and implement your own run() method.
3838
*/
3939
class rust_thread {
40-
private:
41-
volatile bool _is_running;
4240
public:
4341
#if defined(__WIN32__)
4442
HANDLE thread;
@@ -54,8 +52,6 @@ class rust_thread {
5452

5553
void join();
5654

57-
bool is_running();
58-
5955
virtual ~rust_thread() {} // quiet the compiler
6056
};
6157

0 commit comments

Comments
 (0)