Tidying Thread class
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Bloom
|
|||||||
protected:
|
protected:
|
||||||
virtual void setThreadState(ThreadState state) {
|
virtual void setThreadState(ThreadState state) {
|
||||||
this->state.setValue(state);
|
this->state.setValue(state);
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disables signal interrupts on current thread.
|
* Disables signal interrupts on current thread.
|
||||||
@@ -45,9 +45,9 @@ namespace Bloom
|
|||||||
sigset_t set = {};
|
sigset_t set = {};
|
||||||
sigfillset(&set);
|
sigfillset(&set);
|
||||||
sigprocmask(SIG_SETMASK, &set, NULL);
|
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||||
};
|
}
|
||||||
|
|
||||||
void setName(std::string name) {
|
void setName(const std::string& name) {
|
||||||
// POSIX thread names cannot exceed 16 characters, including the terminating null byte.
|
// POSIX thread names cannot exceed 16 characters, including the terminating null byte.
|
||||||
assert(name.size() <= 15);
|
assert(name.size() <= 15);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user