How do you ensure real-time performance in a multi-threaded application?
Implement a deterministic worker scheduler that assigns tasks to the earliest available worker. Process tasks by release time, preserve input order for equal release times, and break worker ties by worker ID.
The function receives tasks, a list of [release_time, duration] pairs, and worker_count. Return completion times in the original task order, where each task starts at max(release_time, worker_available_time).
def schedule_tasks(tasks, worker_count):