Trying to turn a batch file into a webapp and it seems like it might work. I'll have one on when it's ready... hopefully tomorrow

There's a MainThread with dict that references all Batchfile objects (one for each Flask session) but these objects are each in separate threads, and each Flask request is also its own thread. I'm using a threadsafe queue to give the user input back to the appropriate Batchfile thread from the request thread, but when checking the Batchfile output in request I use the dict in MainThread. Allegedly using a Python dict in this way is threadsafe via implementation detail... so maybe it saves work


I really don't want to work more with Python threading than I have to... it's always the annoying part of a project that requires it

Sign in to participate in the conversation
tassaron dot com

This is Brianna's federated microblog homepage! To follow my posts, find another Mastodon instance and join the fediverse.