Skip to content

Instantly share code, notes, and snippets.

View lharp's full-sized avatar

Tomas Lehuta lharp

View GitHub Profile
@lavie
lavie / IBackgroundWorker.as
Created November 22, 2013 06:42
Idle Worker ("background" processing) in Flex. This code is not self contained and relies on some internal libraries, but those aren't important for the understanding of this pattern, which is the aim of this gist.
package com.gigantt.utils
{
import flash.events.Event;
public interface IBackgroundWorker
{
// Do stuff before running - Optional
function prepare() : void;
// Post processing work - Optional. Returns event to be raised by CPU.