And hmm, this really should use a condition variable too.
Attach a file by drag & drop or click to upload