Managing multiple threads with `local variables`

BlitzMax Forums/BlitzMax Programming/Managing multiple threads with `local variables`

Upon some googling, I think what I'm trying to set up is `thread local storage`, but without using official API's. Unfortunately I don't yet see a way of doing this, unless I can use the handle from CreateThread() as some kind of lookup via a hash function or something?