Skip to content

error when using Bosma::Scheduler in the class #24

@phamtung1234

Description

@phamtung1234

I try to using Bosma::Scheduler in my application, I have a TestScheduler define as follow:
`
class TestScheduler : public QWidget
{
Q_OBJECT

public:
TestScheduler(QWidget* parent = 0);
~TestScheduler();
void print();
}
here is it implementation, very simple:
TestScheduler::TestScheduler(QWidget* parent) : QWidget(parent)
{
Bosma::Scheduler s(4);
s.at("2021-05-26 15:50:00", &TestScheduler::print, this);
}

void TestScheduler::print()
{
qDebug() << "ok";
}
`
I run this above but has an error, scheduler do not working. I try to investigate this and found that an error has occupied in the file "ctpl_stl.h", I try print some simple string, the order of thread pool do as follow:

  • init threads
  • resize
  • push function
    after that thread pool do destroy selt, so that scheduler do not working. Please solve this problem because now I only use Bosma::Scheduler in the main function, thank in advanced!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions