#Threads101

1 messages · Page 1 of 1 (latest)

solar briar
#

I'm required to enumerate through a directory and its sub-directories and print all the files metadata to a file.. However, Every time I get inside a sub-dir I'm required to spawn a thread that should do the printing...

The whole idea for this is to practice synchronizing the threads so that when they print the results it doesn't come out messed up..

The thing is I'm not using any synchronizing mechanism, and the result comes out organized.. How is that possible?

inner tuskBOT
#

<@&987246399047479336> please have a look, thanks.

inner tuskBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

umbral steeple