I cannot see the difference. If you don’t want to synchronize threads for just one working thread, it may be a good choice to use constant memory (or kernel parameter, probably easier). As long as the results of some threads will be used by other threads, synchronization is mandatory to avoid data racing. To guarantee right result, the function of disableThreads()/enableThreads() must have this kind of functionality as well. The only way to get rid of this is to make the result independent.