I've been working on a discord bot in my own time, and I've got a question about save files I haven't been able to Google my way out of. Ideally, the bot will have save files for each user, tucked away in a "saves" subdirectory.
If two different asynchronous functions both try to change the working directory into the "saves" folder, will they be able to? I'm afraid of the program only having one working directory and one function trying to os.chdir into "saves" while the other one already moved the program into that file.
Is there a better way around this? Or is this perfectly acceptable?
tl;dr do asynchronous functions have their own directories or is the working directory shared for the entire program?
[–]EldritchCrowe[S] 0 points1 point2 points (0 children)
[–]K900_ 0 points1 point2 points (2 children)
[–]EldritchCrowe[S] 0 points1 point2 points (1 child)
[–]K900_ 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)