Worker

public class Worker extends Thread

The Worker class.

Author:Cosmin Arad <cosmin@sics.se>, Jim Dowling <jdowling@sics.se>

Fields

executionCount

int executionCount

Constructors

Worker

public Worker(WorkStealingScheduler scheduler, int wid)

Instantiates a new worker.

Parameters:
  • scheduler – the scheduler
  • wid – the wid

Methods

addWork

final void addWork(ComponentCore core)

getWid

public final int getWid()

Gets the wid.

Returns:the wid

getWork

final ComponentCore getWork()

getWorkCount

public final int getWorkCount()

Gets the work count.

Returns:the work count

quitWhenNoMoreWork

final void quitWhenNoMoreWork()

run

public final void run()

waitForWork

void waitForWork()

The caller is expected to hold the object lock on entry