Qeueu

Queue (First-In-First-Out, OR First 10 Out):
1) var queue_a:Array;
2) private function next()

I used pool of swf loader objects  (class LoadSwfFile  extends MovieClipLoader) ( OR instead of pool -> new –  dispose)

I had 3 types of loading queues:
– load 1 at once
– load num:Number at once (variations: a) load 10 – loadNext b) always have 10 loading processes)
– load – cache queue (2 stage queue), with LOADING_CAPACITY:Number, CACHING CAPACITY:Number (by caching I mean caching vector sprite in sequence of BitmaData or BitmapData animation sheet)  (So we spread caching not to kill CPU, and meanwhile loading new not to waste time – so we have always loaded clips to cache)

Links from Java (I did not use them while developing, I should evaluate them for refactoring):  (look also for Collection, LinkedList, PriorityQueue, LinkedBlockingQueue, BlockingQueue, ArrayBlockingQueue, LinkedBlockingQueue, PriorityBlockingQueue)
“wait-free” algorithm by Maged M. Michael and Michael L. Scott (SimplePractical Non Blocking Concurrent Queue Algorithm)
Array base Queue Implementation in Java
Class Concurrent Linked Queue
Google “queue java”

This implementation employs an efficient “wait-free” algorithm based on one described in Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms by Maged M. Michael and Michael L. Scott.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: