VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_runnable Struct Reference

A Runnable encapsulates a task to be run from an executor thread. More...

#include <vlc_executor.h>

Collaboration diagram for vlc_runnable:
[legend]

Data Fields

void(* run )(void *userdata)
 This function is to be executed by a vlc_executor_t.
 
void * userdata
 Userdata passed back to run().
 
struct vlc_list node
 

Detailed Description

A Runnable encapsulates a task to be run from an executor thread.

Field Documentation

◆ node

struct vlc_list vlc_runnable::node

◆ run

void(* vlc_runnable::run) (void *userdata)

This function is to be executed by a vlc_executor_t.

It must implement the actions (arbitrarily long) to execute from an executor thread, synchronously. As soon as run() returns, the execution of this runnable is complete.

After the runnable is submitted to an executor via vlc_executor_Submit(), the run() function is executed at most once (zero if the execution is canceled before it was started).

It must not be NULL.

Parameters
userdatathe userdata provided to vlc_executor_Submit()

Referenced by TaskNew(), TaskNew(), ThreadRun(), and ThumbnailerRun().

◆ userdata

void* vlc_runnable::userdata

Userdata passed back to run().

Referenced by TaskNew(), TaskNew(), and ThreadRun().


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