mozilla/rust — Issue #1918: Replace the kernel task map with a port map
Author: brson
Created: 2012-03-02 02:38:16+00:00
State: open
Labels: A-runtime, I-slow

rust_kernel currently maintains a map from `task_id` to `rust_task*`, and it is protected by a lock. The primary use of this is to look up ports in a task's port map which is protected by another lock. Other uses of this map could be eliminated and would be faster for it.

Getting rid of this map will make port lookup faster, task creation and destruction less contentious, the runtime model simpler, and will discourage accessing arbitrary tasks from arbitrary threads (since there's no way to get to them), at the expense of making port construction and destruction more contentious.