Also, is multithreading possible through a C dll or static library?
Yes, but the GC is not thread-safe, so you would have to handle all object management yourself. In practice, this is harder than you might think because BlitzMax does not have weak references so managing the objects yourself means one of two things. Either your library has to have explicit destroy methods and users won't be able to use the GC for any of your library's objects, or you have to have a pretty complex system which reference counts every object and then probably use proxy objects which only ever have one reference to actually pass around in your threads. In short, it seemed an awful lot of trouble when I was looking at it, and I ended up only doing it for one type of object ( textures ) and everything else has explicit destroy methods. That's cool for me because I'm the only one using my engine, but that's not the case for you, so it could be an awful lot of work for you unless I've missed an easier way of doing it.
|