I'd like to post an idea on a method to implement preload/chaching without implement separate thread processes, but internally of course you should handle them asynchronously.
I was thinking about something like:
Code: Select all
; Call an async loading routine for the given filename, if preload_id is Nil means that the Preloading has failed (file not found, etc...)
Local preload_id = Preload(filename)
; Check if the loading has been completed, result can be TRUE or FALSE
Local result = IsLoaded(preload_id)
Code: Select all
Local myBrush = LoadBrush(Nil, preload_id)
Code: Select all
...
While IsLoaded(preload_is)
...
Wend
Local myBrush = LoadBrush(Nil, preload_id)
Could it be possible?