Example 12: Queues

This example shows the basics on to implement queues.

You can find the code for the example in our GitHub repository.

Introduction

This example will both create and start a process queue and a schedule queue and add entries to them. These will output some text to the background method server

Implementation

The implementation is triggered by a Diagnostics screen. This will use methods running the the foreground to both create and add entries to the queues:

image-20220916164116365

A scheduled queue is used to defer an operation or to setup a specific operation that happens at a specific time and may repeat:

image-20220916164229336

Execution

Use the example Extension Diagnostics window to trigger the queues.

image-20220916153754049

The process queue will be executed almost immediately; the scheduled queue, after 1 minute:

image-20220916163842248

Note: You can stop and start the queues to see the execution.