So it'd be nice to see support for threading. Like I want to know what threads are active by their numbers and which have stopped.
some pseudo:
activeThreads=0
thread
ISALIVE=FALSE //using byond convention, I assume
functionPointer = null
threadID = -1
proc/CheckState()
proc/SpawnNextThread()
New()
.=..()
if(.)
threadID = activeThreads + 1
if(functionPointer != null)
SpawnNextThread()
You get the point. I'm exhausted and sick, but I thought of how I screwed around with byond a couple months ago and forgot to post anything about this. So the idea is...add support for "threading" (interpret this however byond actually works). It would be nice to run things concurrently in a more efficient and transparent manner.
To give you an idea of some of the problems, picture two procs running on different threads but accessing the same obj. Say proc #1 deletes the obj. Proc #2 may be in the middle of a routine that deals with the obj's internals, and can't allow the obj to be truly deleted. If it is, you get an instant crash when proc #2 tries to access one of the structure's variables. Then we'd not only have to have the regular refcounts, but a special internal refcount that we strictly obeyed that would prevent the actual item from being deleted. So much would have to be changed internally that this would be a massive overhaul.
And that doesn't even begin to bring up other potential timing issues, the kinds that OS programmers rip out their hair over, which would be the problem of the end user.
Lummox JR