(ts-enqueue obj queue) safely adds obj to queue, signals the queue's semaphore to allow the object to be consumed by some consumer, and finally returns obj.