Wishlist (my go?)

BlitzMax Forums/BlitzMax Programming/Wishlist (my go?)

Having a single gathering place for mods would be really crazy valuable.
Good idea. However until this happens:
I would like some acreditation of acceptance for the 3rd party Mods
I don't see the later standing much of a chance. Sorry.

Can someone explain me HOW it should works - if it could be possible of course! - in a plain blitzmax source code?
Sure.
Type LoadImageASync Extends TImage Implements IRunable

	Field resNme:String
	Field isDone:Int = False

	Method Syncronized Run() 'The whole object is considered a critical section
		isDone = False
		resource = load(resName)
		isDone = True
	EndMethod

	Method setName(sName:String)
		Syncronized(resNme) ' This is a critical section
			resNme = sName
		EndSyncronized
	EndMethod
EndType
You would then invoke it like so:
lias = new LoadImageASync
lias.setName("myImage.png")
lias.Start() ' Invokes the "Run" method.
' Do other stuff, while Image is loading in seperate thread.
DrawImage lias.getImage(),0,0
The getImage method can be done either blocking (ie. it waits until the Run method is finished, and the image is loaded completely) or non-blocking (with a slightly modified Run method) where it simply returns Null if the Image hasn't loaded completely.

Ofcourse to do this safely you would need to have Interfaces, and preferably private/public access modifiers.