10-19-2025, 05:46 AM
quite honestly. if you want to mess around with threads. you will have to program in something else other than qb64 phoenix.
like the others said. regardless of what operating system you would want to run your program in. there will be race conditions. one service trying to step over all others. trying to be first. in setting itself up and/or having access to ram, disk space and other resources.
that's why string access is inherently not thread-safe. this is a killer. for many people who like basic's convenience with string handling. that's why a programming language cannot be used neither which employs garbage collection. such as lua. it's harmful for music-production application for example. that's why a complex program like reaper. crashes occasionally. there's just too much to keep track of. while needing to keep things in tight synchronization. if such a demanding a program had to make sure things were thread-safe. it would just come to a grinding halt. ("mutex lock" is an essential part of keeping track of thread execution.) a bit better than that. it could freeze at specific intervals. which is very irritating. many people have rejected linux distributions because of it.
in the least. in some programming system implementations i've seen. the "thread" has to be an entire function. which relies only on global variables. cannot even accept arguments. no local variables of any kind. the stack for such a function. either will not exist or will have to be protected.
the subject should be read about extensively.
like the others said. regardless of what operating system you would want to run your program in. there will be race conditions. one service trying to step over all others. trying to be first. in setting itself up and/or having access to ram, disk space and other resources.
that's why string access is inherently not thread-safe. this is a killer. for many people who like basic's convenience with string handling. that's why a programming language cannot be used neither which employs garbage collection. such as lua. it's harmful for music-production application for example. that's why a complex program like reaper. crashes occasionally. there's just too much to keep track of. while needing to keep things in tight synchronization. if such a demanding a program had to make sure things were thread-safe. it would just come to a grinding halt. ("mutex lock" is an essential part of keeping track of thread execution.) a bit better than that. it could freeze at specific intervals. which is very irritating. many people have rejected linux distributions because of it.
in the least. in some programming system implementations i've seen. the "thread" has to be an entire function. which relies only on global variables. cannot even accept arguments. no local variables of any kind. the stack for such a function. either will not exist or will have to be protected.
the subject should be read about extensively.

