Jerryscript::Task Class Reference

  • Task that runs the loop JavaScript function in the background
More...

#include <Task.h>

Inheritance diagram for Jerryscript::Task:
Collaboration diagram for Jerryscript::Task:

Public Member Functions

 Task (const Object &context, unsigned intervalMs=500)
 
 Task (unsigned intervalMs=500)
 
void loop () override
 Inherited classes override this to perform actual work. More...
 
bool hasError ()
 
String getError ()
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
bool resume ()
 Call to set task running. More...
 
void suspend ()
 Suspend a task. More...
 
void sleep (unsigned interval)
 Puts the task to sleep for a while. More...
 

Additional Inherited Members

- Public Types inherited from Task
enum  State { State::Suspended, State::Sleeping, State::Running }
 State of a task. More...
 
enum  Notify {
  Notify::None, Notify::Suspending, Notify::Resuming, Notify::Sleeping,
  Notify::Waking
}
 Notification of state change. More...
 
- Protected Member Functions inherited from Task
virtual void onNotify (Notify code)
 Called immediately before calling to loop() to indicate a state change. More...
 

Detailed Description

  • Task that runs the loop JavaScript function in the background

Constructor & Destructor Documentation

◆ Task() [1/2]

Jerryscript::Task::Task ( const Object context,
unsigned  intervalMs = 500 
)
inline

◆ Task() [2/2]

Jerryscript::Task::Task ( unsigned  intervalMs = 500)
inline

Member Function Documentation

◆ getError()

String Jerryscript::Task::getError ( )
inline

◆ hasError()

bool Jerryscript::Task::hasError ( )
inline

◆ loop()

void Jerryscript::Task::loop ( )
inlineoverridevirtual

Inherited classes override this to perform actual work.

Implements Task.


The documentation for this class was generated from the following file: