Files
mercury/java/runtime/NativeThread.java
Zoltan Somogyi 8e45a89895 Use spaces, not tabs, in the Java and C# runtimes.
Add modelines to keep it that way.

Fix formatting, and english in comments.
2018-07-10 13:52:11 +02:00

47 lines
830 B
Java

// vim: ts=4 sw=4 expandtab ft=java
//
// Copyright (C) 2018 The Mercury team.
// This file is distributed under the terms specified in COPYING.LIB.
//
package jmercury.runtime;
/**
* Native thread.
*
* A Native thread is created by Mercury to tasks created with
* spawn_native/4.
*/
public class NativeThread extends MercuryThread
{
private Runnable task;
/**
* Create a new native thread.
* @param id The id for the new thread.
* @param task The task to execute.
*/
public NativeThread(int id, Runnable task) {
super("Mercury Native Thread", id);
this.task = task;
}
public void run() {
task.run();
}
/**
* no-op
*/
public void blocked() {
;
}
/**
* no-op
*/
public void running() {
;
}
}