Skip to content

Commit 54889c0

Browse files
committed
#7 - Added freeOnTerminate to Thread's Constructor
1 parent b7933e7 commit 54889c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ESPressio_Thread.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
namespace ESPressio {
77

88
namespace Threads {
9-
9+
1010
// Define the Constructor and Destructor of `Thread` here
11-
Thread::Thread() : _threadID(0) {
11+
Thread::Thread(bool freeOnTerminate = false) : _threadID(0) {
12+
SetFreeOnTerminate(freeOnTerminate);
1213
_threadID = ThreadManager::GetInstance()->GetThreadCount();
1314
SetCoreID(ThreadManager::GetInstance()->AddThread(this));
1415
}

0 commit comments

Comments
 (0)