一个运行Runnable对象的平台

时间:2016-05-19 07:04:53

标签: spring multithreading javabeans

我正在尝试为客户创建一个平台,以无限的速度以指定的速率运行他们的Runnable对象。 我有以下代码:

public class Health
{
    public Health(Runnable r, int rate)
    {
       // I want to fork a new thread and then run the Runnable at the 
       // specified rate. How ??
    }
}

客户端将使用自己的Runnable和rate创建一个Health bean。我怎样才能做到这一点。

0 个答案:

没有答案
相关问题