Skip to content

Commit 462ace3

Browse files
mihashcoJoogabYun
authored andcommitted
raster: added default task name
1 parent ee18d81 commit 462ace3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/vector/vraster.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ using VTask = std::shared_ptr<VRleTask>;
420420
#include <thread>
421421
#include "vtaskqueue.h"
422422

423+
#ifdef __linux__
424+
#include <pthread.h>
425+
#include <sstream>
426+
#endif
427+
423428
class RleTaskScheduler {
424429
const unsigned _count{std::thread::hardware_concurrency()};
425430
std::vector<std::thread> _threads;
@@ -435,6 +440,13 @@ class RleTaskScheduler {
435440
SW_FT_Stroker stroker;
436441
SW_FT_Stroker_New(&stroker);
437442

443+
// Create Thread Name for Debugging (Linux)
444+
#ifdef __linux__
445+
std::ostringstream nameStream;
446+
nameStream << "lottie-tsk-" << i;
447+
pthread_setname_np(pthread_self(), nameStream.str().c_str());
448+
#endif
449+
438450
// Task Loop
439451
VTask task;
440452
while (true) {

0 commit comments

Comments
 (0)