| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::task Class Reference

`#include <uhd/utils/tasks.hpp>`

Inheritance diagram for uhd::task:

## Public Types
typedef std::shared_ptr< task > | sptr
typedef std::function< void(void)> | task_fcn_type

## Static Public Member Functions
static sptr | make (const task_fcn_type &task_fcn, const std::string &name="")

## Member Typedef Documentation

## ◆ sptr

typedef std::shared_ptr<task> uhd::task::sptr

## ◆ task_fcn_type

typedef std::function<void(void)> uhd::task::task_fcn_type

## Member Function Documentation

## ◆ make()

sptr uhd::task::make | ( | const task_fcn_type & | task_fcn,
|  | const std::string & | name = "" )
| static

Create a new task object with function callback. The task function callback will be run in a loop. until the thread is interrupted by the destructor.

A task should return in a reasonable amount of time. It may not block, or the destructor will also block.

Parameters

  task_fcn | the task callback function
  name | Task name. Will be used as a thread name.

Returns
  a new task object

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

- tasks.hpp