Skip to content

Commit 7196b8e

Browse files
committed
- Fixing Thread
1 parent 1b8b821 commit 7196b8e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/ESPressio_IThread.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ namespace ESPressio {
2727
`IThread` is a common Interface for all Thread Types provided by this library.
2828
You can use it to reference any Thread Type without knowing the actual type.
2929
*/
30-
class IThread : public IObject<IThread> {
30+
template <typename Derived>
31+
class IThread : public IObject<Derived> {
3132
public:
3233
// Methods
3334

src/ESPressio_Thread.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ namespace ESPressio {
2020
`Thread` is a class that represents a "standard" Thread in the system.
2121
It is a wrapper around the system's Thread API, designed to make them much easier to use.
2222
*/
23-
class Thread : public IThread, public Object<Thread> {
23+
template <typename Derived>
24+
class Thread : public IThread<Derived>, public Object<Derived> {
2425
private:
2526
// Type Definitions
2627

src/ESPressio_ThreadGarbageCollector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace ESPressio {
1111

1212
namespace Threads {
1313

14-
class ThreadGarbageCollector : Thread {
14+
class ThreadGarbageCollector : Thread<ThreadGarbageCollector> {
1515
private:
1616
// A semaphore for our loop to wait on (so that it doesn't consume CPU cycles when there's nothing to do).
1717
SemaphoreHandle_t _semaphore = xSemaphoreCreateBinary();

0 commit comments

Comments
 (0)