python - synchronization problem - with semaphore