# Class TFMXWorkScheduler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFFMXWorkScheduler

## Declaration

`type TFMXWorkScheduler = class(TComponent)`

## Description

Implementation of an external message pump for FMX.

Read the GlobalCEFApp.OnScheduleMessagePumpWork documentation for all the details.

## Hierarchy

- TObject
- TPersistent
- TComponent
- TFMXWorkScheduler

## Overview

### Fields

| `FThread: TCEFWorkSchedulerThread;`
| `FQueueThread: TCEFWorkSchedulerQueueThread;`
| `FDepleteWorkCycles: cardinal;`
| `FDepleteWorkDelay: cardinal;`
| `FDefaultInterval: integer;`
| `FStopped: boolean;`
| `FUseQueueThread: boolean;`
| `FPriority: TThreadPriority;`

### Methods

| `procedure CreateQueueThread;`
| `procedure DestroyQueueThread;`
| `procedure QueueThread_OnPulse(Sender : TObject; aDelay : integer);`
| `procedure DestroyThread;`
| `procedure DepleteWork;`
| `procedure NextPulse(aInterval : integer);`
| `procedure DoWork;`
| `procedure DoMessageLoopWork;`
| `procedure Initialize;`
| `procedure SetDefaultInterval(aValue : integer);`
| `procedure SetPriority(aValue : TThreadPriority);`
| `procedure Thread_OnPulse(Sender : TObject);`
| `constructor Create(AOwner: TComponent); override;`
| `constructor CreateDelayed;`
| `destructor Destroy; override;`
| `procedure ScheduleMessagePumpWork(const delay_ms : int64);`
| `procedure StopScheduler;`
| `procedure ScheduleWork(const delay_ms : int64);`
| `procedure CreateThread;`

### Properties

| `property Priority : TThreadPriority read FPriority write SetPriority default tpNormal;`
| `property DefaultInterval : integer read FDefaultInterval write SetDefaultInterval default CEF_TIMER_MAXDELAY;`
| `property DepleteWorkCycles : cardinal read FDepleteWorkCycles write FDepleteWorkCycles default CEF_TIMER_DEPLETEWORK_CYCLES;`
| `property DepleteWorkDelay : cardinal read FDepleteWorkDelay write FDepleteWorkDelay default CEF_TIMER_DEPLETEWORK_DELAY;`
| `property UseQueueThread : boolean read FUseQueueThread write FUseQueueThread default False;`

## Description

### Fields

| `FThread: TCEFWorkSchedulerThread;`
This item has no description.

| `FQueueThread: TCEFWorkSchedulerQueueThread;`
This item has no description.

| `FDepleteWorkCycles: cardinal;`
This item has no description.

| `FDepleteWorkDelay: cardinal;`
This item has no description.

| `FDefaultInterval: integer;`
This item has no description.

| `FStopped: boolean;`
This item has no description.

| `FUseQueueThread: boolean;`
This item has no description.

| `FPriority: TThreadPriority;`
This item has no description.

### Methods

| `procedure CreateQueueThread;`
This item has no description.

| `procedure DestroyQueueThread;`
This item has no description.

| `procedure QueueThread_OnPulse(Sender : TObject; aDelay : integer);`
This item has no description.

| `procedure DestroyThread;`
This item has no description.

| `procedure DepleteWork;`
This item has no description.

| `procedure NextPulse(aInterval : integer);`
This item has no description.

| `procedure DoWork;`
This item has no description.

| `procedure DoMessageLoopWork;`
This item has no description.

| `procedure Initialize;`
This item has no description.

| `procedure SetDefaultInterval(aValue : integer);`
This item has no description.

| `procedure SetPriority(aValue : TThreadPriority);`
This item has no description.

| `procedure Thread_OnPulse(Sender : TObject);`
This item has no description.

| `constructor Create(AOwner: TComponent); override;`
Full constructor of TFMXWorkScheduler. This constructor also creates the internal threads.

| `constructor CreateDelayed;`
Partial constructor of TFMXWorkScheduler. This constructor doesn't create any threads. Call TFMXWorkScheduler.CreateThread when necessary.

| `destructor Destroy; override;`
TFMXWorkScheduler destructor.

| `procedure ScheduleMessagePumpWork(const delay_ms : int64);`
Called from GlobalCEFApp.OnScheduleMessagePumpWork to schedule a GlobalCEFApp.DoMessageLoopWork call asynchronously to perform a single iteration of CEF message loop processing. ###### Parameters delay_ms Requested delay in milliseconds.

| `procedure StopScheduler;`
Stop the scheduler. This function must be called after the destruction of all the forms in the application.

| `procedure ScheduleWork(const delay_ms : int64);`
Schedule a GlobalCEFApp.DoMessageLoopWork call synchronously to perform a single iteration of CEF message loop processing.

| `procedure CreateThread;`
Creates all the internal threads used by TCEFWorkScheduler.

### Properties

| `property Priority : TThreadPriority read FPriority write SetPriority default tpNormal;`
Priority of TCEFWorkSchedulerThread in Windows.

| `property DefaultInterval : integer read FDefaultInterval write SetDefaultInterval default CEF_TIMER_MAXDELAY;`
Default interval in milliseconds to do the next GlobalCEFApp.DoMessageLoopWork call.

| `property DepleteWorkCycles : cardinal read FDepleteWorkCycles write FDepleteWorkCycles default CEF_TIMER_DEPLETEWORK_CYCLES;`
Number of cycles used to deplete the remaining messages in the work loop.

| `property DepleteWorkDelay : cardinal read FDepleteWorkDelay write FDepleteWorkDelay default CEF_TIMER_DEPLETEWORK_DELAY;`
Delay in milliseconds between the cycles used to deplete the remaining messages in the work loop.

| `property UseQueueThread : boolean read FUseQueueThread write FUseQueueThread default False;`
Use a custom queue thread instead of Windows messages or any other way to schedule the next pump work.

Generated by PasDoc 0.16.0-snapshot.