Delegating Tasks to Specific Thread

Title says it all actually,

I was wondering how to delegate a task to a specific thread.

public ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(2);

Basically I have two threads, and I have two groups of tasks and want to delegate them to their respective threads, but am not sure how - since there doesn’t seem to be anything in the wiki.

Thanks so much guys! Was waiting for a long time to get internet again - days to ask this question.

This seems like a regular Java question… not sure what it has to do with SpiderMonkey.

Else, I don’t understand the question.