Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
sick zip everywhere
Jul 21, 2010

chumpchous posted:

i'm not really a programmer but unfortunately, i do a lot of programming. most of the programming i do would have been better off getting outsourced to india.

i can't really post in serious programming threads because i'll basically jsut get made fun of, which is fine, but usually i'll get made fun of and my question won't get answered. so here is a :siren:SAFE SPACE:siren: for bad programmers to hang out and try to get better at stuff.


i'll start this off with a question about preventing code from getting executed asynchronously. when does code get executed asynchronously? i always kinda figured that most code gets executed in a line, but it seems like when i call other functions, or espescially when i call some shell command, it won't actually block the thread and i'll end up with things happening at the same time when they really shouldn't be. i think they call this a race condition??

any pro tips?

generally i put some sleep()s in there so the other threads can catch up. asynchronous programming isnt that bad when you get used to it

Adbot
ADBOT LOVES YOU

  • Locked thread